---
id: object/codeunit/20439
type: object
title: Codeunit 20439 "Qlty. Item Tracking Mgmt."
summary: Codeunit 20439 "Qlty. Item Tracking Mgmt." in Quality Management (Microsoft.QualityManagement.Integration.Inventory). 8 public procedures, 5 events, 2 event subscribers. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - quality management
versions:
  introduced: "29"
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 66556a5a2c5fb38bb1cc5dce161a0b7025e2fdd871b4cfd54c63e00d2394f9b0
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Quality%20Management/app/src/Integration/Inventory/QltyItemTrackingMgmt.Codeunit.al
    title: src/Apps/W1/Quality Management/app/src/Integration/Inventory/QltyItemTrackingMgmt.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/10270
    - change/bcapps/8556
object_type: codeunit
object_id: 20439
name: Qlty. Item Tracking Mgmt.
namespace: Microsoft.QualityManagement.Integration.Inventory
app: Quality Management
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 18
  events: 5
  subscribers: 2
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 7
  implements: 0
---

# Codeunit 20439 "Qlty. Item Tracking Mgmt."

> Codeunit 20439 "Qlty. Item Tracking Mgmt." in Quality Management (Microsoft.QualityManagement.Integration.Inventory). 8 public procedures, 5 events, 2 event subscribers. Introduced in BC29, still in BC30.

Quality Management · Microsoft.QualityManagement.Integration.Inventory · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Quality%20Management/app/src/Integration/Inventory/QltyItemTrackingMgmt.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Permissions | tabledata "Whse. Item Tracking Line" = rimd |

## Events published

- `OnBeforeCreatePurchaseReturnReservationEntries(var PurchPurchaseLine: Record "Purchase Line"; var SerialNo: Code[50]; var LotNo: Code[50]; var PackageNo: Code[50]; var ExpirationDate: Date; var ChangeQty: Decimal; var IsHandled: Boolean)` (integration): Notifies subscribers before purchase return reservation entries are changed and permits replacement of the standard behavior.
- `OnBeforeCreateWarehouseJournalLineReservationEntry(var QltyInspectionHeader: Record "Qlty. Inspection Header"; var TempQuantityToActQltyDispositionBuffer: Record "Qlty. Disposition Buffer" temporary; var WhseJnlWarehouseJournalLine: Record "Warehouse Journal Line"; var IsHandled: Boolean)` (integration): Notifies subscribers before a warehouse item-tracking line is created and permits replacement of the standard behavior.
- `OnBeforeCreateItemJournalLineReservationEntry(var ItemJournalLine: Record "Item Journal Line"; var CreatedActualReservationEntry: Record "Reservation Entry"; var IsHandled: Boolean)` (integration): Notifies subscribers before an item journal reservation entry is created and permits replacement of the standard behavior.
- `OnAfterCreateItemJournalLineReservationEntry(var ItemJournalLine: Record "Item Journal Line"; var ReservationEntry: Record "Reservation Entry")` (integration): Notifies subscribers after an item journal reservation entry is created.
- `OnAfterCreateWarehouseJournalLineReservationEntry(var QltyInspectionHeader: Record "Qlty. Inspection Header"; var TempQuantityToActQltyDispositionBuffer: Record "Qlty. Disposition Buffer" temporary; var WhseJnlWarehouseJournalLine: Record "Warehouse Journal Line"; var WhseItemTrackingLine: Record "Whse. Item Tracking Line")` (integration): Notifies subscribers after a warehouse item-tracking line is created.

## Event subscriptions

- HandleOnTemplateSelectionSetFilter subscribes to Codeunit "ItemJnlManagement" OnTemplateSelectionSetFilter
- HandleOnTemplateSelectionOnAfterSetFilters subscribes to Table "Warehouse Journal Line" OnTemplateSelectionOnAfterSetFilters

## Procedures

- `CreateItemJournalLineReservationEntry(var ItemJournalLine: Record "Item Journal Line"; var CreatedActualReservationEntry: Record "Reservation Entry")` (internal): Creates a reservation entry from the item-tracking values on an item journal line. Set the tracking on the line (no modify needed) to give the tracking instruction.
- `GetExpirationDate(QltyInspectionHeader: Record "Qlty. Inspection Header"; LocationCode: Code[10]): Date` (internal): Gets the warehouse expiration date for the item-tracking values on an inspection at a location.
- `GetIsWarehouseTracked(ItemNo: Code[20]): Boolean` (internal): Determines whether an item uses lot, serial, or package warehouse tracking.
- `GetItemTrackingCode(ItemNo: Code[20]; var ItemTrackingCode: Record "Item Tracking Code"): Boolean` (internal): Gets the item tracking code assigned to an item.
- `DeleteAndRecreatePurchaseReturnOrderLineTracking(QltyInspectionHeader: Record "Qlty. Inspection Header"; ReturnOrderPurchaseLine: Record "Purchase Line"; QtyToReturn: Decimal)` (internal): Replaces all reservation entries for a purchase return line with one entry using the inspection tracking values and requested quantity.
- `CreateOutboundTransferLineReservationEntries(var QltyInspectionHeader: Record "Qlty. Inspection Header"; var TempQuantityToActQltyDispositionBuffer: Record "Qlty. Disposition Buffer" temporary; var TransferLine: Record "Transfer Line")` (internal): Creates an outbound surplus reservation entry for a transfer line from inspection tracking values.
- `CreatePurchaseReturnReservationEntries(PurchPurchaseLine: Record "Purchase Line"; SerialNo: Code[50]; LotNo: Code[50]; PackageNo: Code[50]; ExpirationDate: Date; ChangeQty: Decimal)` (internal): Adds, reduces, or replaces surplus item-tracking entries for a purchase return line.
- `CreateWarehouseJournalLineReservationEntry(var QltyInspectionHeader: Record "Qlty. Inspection Header"; var TempQuantityToActQltyDispositionBuffer: Record "Qlty. Disposition Buffer" temporary; var WarehouseJournalLine: Record "Warehouse Journal Line"; var WhseItemTrackingLine: Record "Whse. Item Tracking Line")` (internal): Creates a warehouse item-tracking line for a disposition warehouse journal line.

Plus 3 local procedures.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 99000830 "Create Reserv. Entry"](../codeunit/99000830.md) (16 calls: `CreateItemJournalLineReservationEntry → CreateEntry`, `CreateItemJournalLineReservationEntry → CreateReservEntryFor`, `CreateItemJournalLineReservationEntry → GetLastEntry`, …)

## Called by

- [Codeunit 20454 "Qlty. Item Journal Management"](../codeunit/20454.md) (5 calls: `CreateItemJournalLine → CreateItemJournalLineReservationEntry`, `CreateItemJournalLine → GetExpirationDate`, `CreateWarehouseJournalLine → CreateWarehouseJournalLineReservationEntry`, …)
- [Codeunit 20441 "Qlty. Disp. Purchase Return"](../codeunit/20441.md) (1 call: `CreatePurchaseReturnOrderLine → DeleteAndRecreatePurchaseReturnOrderLineTracking`)
- [Codeunit 20444 "Qlty. Disp. Transfer"](../codeunit/20444.md) (1 call: `CreateTransferLineWithOutboundTracking → CreateOutboundTransferLineReservationEntries`)
- [Codeunit 20445 "Qlty. Inventory Availability"](../codeunit/20445.md) (1 call: `GetFromLocationAndBinBasedOnNamingConventions → GetItemTrackingCode`)
- [Codeunit 20447 "Qlty. Disp. Internal Put-away"](../codeunit/20447.md) (1 call: `CreateInternalPutawayLine → GetExpirationDate`)
- [Codeunit 20450 "Qlty. Disp. Internal Move"](../codeunit/20450.md) (1 call: `CreateInternalMovementLine → GetExpirationDate`)
- [Codeunit 20451 "Qlty. Disp. Move Worksheet"](../codeunit/20451.md) (1 call: `CreateWarehouseWorksheetLine → GetExpirationDate`)

## Recent changes

- 2026-08-20 [#10270 [Quality Management] Repair and improve XML documentation of procedures](../../changes/bcapps/10270.md) (main, BC30, refactor)
- 2026-07-08 [#8556 [Quality Management] Enforce rules and restrictions with indirect and implicit permissions](../../changes/bcapps/8556.md) (main, BC30, feature)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Qlty. Item Tracking Mgmt.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
