Codeunit 5826 "Matched Order Line Mgmt."
Base Application · Microsoft.Inventory.Tracking
Across versions
- BC23-27not present
- BC28added
- BC2912 procedures added, 3 procedures removed
- BC303 procedures removed
Neighbourhood 17 connected objects and pages
Base Application · Microsoft.Inventory.Tracking · BC28-30 · source at 4e6a307c · facts from BC29
Properties
| Property | Value |
|---|---|
| Access | Public |
| Permissions | TableData “Posted Matched Order Line” = RIMD |
Events published
OnInsertMatchedOrderLineOnBeforeInsert(var MatchedOrderLine: Record "Matched Order Line")(integration)OnGetPurchaseOrderLinesOnBeforeInsertPurchaseLineInvoice(var PurchaseLineInvoice: Record "Purchase Line"; PurchaseLineOrder: Record "Purchase Line")(integration)OnGetPurchaseOrderLinesOnAfterSetPurchaseLineOrderFilters(var PurchaseLineOrder: Record "Purchase Line"; PurchaseHeaderInvoice: Record "Purchase Header")(integration)- subscribers: Codeunit 20535 “Subc. Purch. Post Ext” ExcludeSubcontractingLinesOnGetPurchaseOrderLines
OnGetPurchaseOrderLinesOnBeforeModifyPurchaseLineInvoice(var PurchaseLineInvoice: Record "Purchase Line"; PurchaseLineOrder: Record "Purchase Line")(integration)OnValidateQtyToInvoiceOnBeforeModifyMatchedOrderLine(var MatchedOrderLine: Record "Matched Order Line"; DetailedMatchedOrderLine: Record "Detailed Matched Order Line")(integration)OnValidateQtyToInvoiceOnBeforeUpdateQtyOnParentLines(MatchedOrderLine: Record "Matched Order Line"; DetailedMatchedOrderLine: Record "Detailed Matched Order Line"; xDetailedMatchedOrderLine: Record "Detailed Matched Order Line")(integration)OnInsertPostedMatchedOrderLinesOnBeforeInsertPostedMatchedOrderLine(var PostedMatchedOrderLine: Record "Posted Matched Order Line"; MatchedOrderLine: Record "Matched Order Line"; var PurchInvLine: Record "Purch. Inv. Line"; PurchaseLine: Record "Purchase Line")(integration)OnAfterLoadOneLineForPurchaseInvoice(var DetailedMatchedOrderLine: Record "Detailed Matched Order Line"; SourceLineSystemId: Guid; PurchaseLineInvoice: Record "Purchase Line")(integration)OnUpdateQtyOnParentLinesOnBeforeModifyTempDetailedMatchedOrderLine(var TempDetailedMatchedOrderLine: Record "Detailed Matched Order Line" temporary; var DetailedMatchedOrderLine: Record "Detailed Matched Order Line"; UpdateInvoiceLine: Boolean; QtyToInvoiceDiff: Decimal; QtyToInvoiceBaseDiff: Decimal)(integration)OnAfterLoadOneLineForPostedPurchaseInvoice(var DetailedMatchedOrderLine: Record "Detailed Matched Order Line"; SourceLineSystemId: Guid; PurchInvLine: Record "Purch. Inv. Line")(integration)
Procedures
ApplyVendorsReceiptOnInvoicePolicy(var PurchaseHeader: Record "Purchase Header")+ BC29 (internal)ApplyReceiptOnInvoiceToLines(PurchaseHeader: Record "Purchase Header")+ BC29 (internal)ProcessMatchedReceiptOnInvoice(var PurchaseLine: Record "Purchase Line")(internal)InsertMatchedOrderLineReceipt(PurchaseLineOrder: Record "Purchase Line"; var PurchRcptLine: Record "Purch. Rcpt. Line")(internal)CheckMatchedOrderLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line")(internal)SetMatchedReceiptLinesFilter(var PurchRcptLine: Record "Purch. Rcpt. Line"; PurchaseLineInvoice: Record "Purchase Line")(internal)SetQtyToBeInvoiced(var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; PurchaseLineInvoice: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line")(internal)UpdateMatchedOrderLines(var TempPurchaseLine: Record "Purchase Line" temporary; var PurchaseHeader: Record "Purchase Header")(internal)InsertPostedMatchedOrderLines(var PurchInvLine: Record "Purch. Inv. Line"; PurchaseLine: Record "Purchase Line")(internal)IsLineMatchedToReceiptShipment(PurchaseLine: Record "Purchase Line"): Boolean(internal)CheckLineCanBeMatched(PurchaseLine: Record "Purchase Line")+ BC29 (internal)IsLineMatched(PurchaseLine: Record "Purchase Line"; ShowError: Boolean): Boolean(internal)DeleteMatchedOrderLines(var PurchaseLine: Record "Purchase Line")(internal)DeleteAllMatchedOrderLines(var PurchaseHeader: Record "Purchase Header")(internal)DeleteMatchedLinesForPurchReceipt(var PurchRcptLine: Record "Purch. Rcpt. Line")(internal)DeleteMatchedLinesFromPostedPurchaseInvoice(var PurchInvLine: Record "Purch. Inv. Line")(internal)LoadLines(MatchedOrderLineSource: Enum "Matched Order Line Source"; var DetailedMatchedOrderLine: Record "Detailed Matched Order Line"; ShowFromHeader: Boolean; SourceRecordSystemId: Guid)(internal)LoadLinesForPurchaseInvoice(var DetailedMatchedOrderLine: Record "Detailed Matched Order Line"; ShowFromHeader: Boolean; SourceRecordSystemId: Guid)(internal)LoadLinesForPostedPurchaseInvoice(var DetailedMatchedOrderLine: Record "Detailed Matched Order Line"; ShowFromHeader: Boolean; SourceRecordSystemId: Guid)(internal)LoadOneLineForPurchaseInvoice(var DetailedMatchedOrderLine: Record "Detailed Matched Order Line"; SourceLineSystemId: Guid)(internal)LoadOneLineForPostedPurchaseInvoice(var DetailedMatchedOrderLine: Record "Detailed Matched Order Line"; SourceLineSystemId: Guid)(internal)GetOrderLines(MatchedOrderLineSource: Enum "Matched Order Line Source"; DetailedMatchedOrderLine: Record "Detailed Matched Order Line")(internal)GetOrderLinesForPurchaseInvoice(var DetailedMatchedOrderLine: Record "Detailed Matched Order Line")(internal)GetReceiptShipmentLines(MatchedOrderLineSource: Enum "Matched Order Line Source"; DetailedMatchedOrderLine: Record "Detailed Matched Order Line")(internal)GetPurchaseReceiptLines(DetailedMatchedOrderLine: Record "Detailed Matched Order Line")(internal)ShowItemTrackingEntries(MatchedOrderLineSource: Enum "Matched Order Line Source"; DetailedMatchedOrderLine: Record "Detailed Matched Order Line")(internal)ShowItemTrackingEntriesForPurchaseInvoice(DetailedMatchedOrderLine: Record "Detailed Matched Order Line")(internal)ShowDocument(MatchedOrderLineSource: Enum "Matched Order Line Source"; DetailedMatchedOrderLine: Record "Detailed Matched Order Line")(internal)ShowPurchaseInvoiceDocument(DetailedMatchedOrderLine: Record "Detailed Matched Order Line")(internal)ValidateQtyToInvoice(MatchedOrderLineSource: Enum "Matched Order Line Source"; var DetailedMatchedOrderLine: Record "Detailed Matched Order Line"; var xDetailedMatchedOrderLine: Record "Detailed Matched Order Line")(internal)UpdateQtyOnParentLines(var DetailedMatchedOrderLine: Record "Detailed Matched Order Line"; UpdateInvoiceLine: Boolean; QtyToInvoiceDiff: Decimal; QtyToInvoiceBaseDiff: Decimal)(internal)ValidateQtyToInvoiceForPurchaseInvoice(var DetailedMatchedOrderLine: Record "Detailed Matched Order Line")(internal)GetPurchaseOrderLines(PurchaseLine: Record "Purchase Line")Δ BC29CheckReceiptOnInvoiceAllowed(PurchaseHeader: Record "Purchase Header")(internal)CheckLineReceiptOnInvoiceAllowed(PurchaseLine: Record "Purchase Line")+ BC29 (internal)IsLineReceiptOnInvoiceAllowed(PurchaseLine: Record "Purchase Line"; var ErrorMessage: Text): Boolean+ BC29 (internal)IsReceiptOnInvoiceAllowedForItem(Item: Record Item): Boolean+ BC29 (internal)IsReceiptOnInvoiceAllowedForLocation(LocationCode: Code[10]): Boolean+ BC29 (internal)IsReceiptOnInvoiceAllowedForLine(PurchaseLine: Record "Purchase Line"): Boolean+ BC29 − BC30 (internal): Checks whether the location of the purchase line allows Receipt on Invoice. Lines that are not inventory items, and drop shipment lines, are never received through a warehouse receipt, so the location is not checked for them.ApplyPurchaseLineReceiptSettingToMatches(PurchaseLine: Record "Purchase Line")+ BC29 (internal)RefreshMatchedOrderLineReceipt(PurchaseHeader: Record "Purchase Header")(internal)LineCanBeDeleted(var DetailedMatchedOrderLine: Record "Detailed Matched Order Line"; SourceIsOpenDocument: Boolean): Boolean(internal)ShowMatchedInvoiceLines(PurchaseLineOrder: Record "Purchase Line")Δ BC29
Plus 6 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 8703 “Feature Telemetry” (7 calls:
GetOrderLinesForPurchaseInvoice → LogUsage,GetPurchaseOrderLines → LogUsage,GetPurchaseReceiptLines → LogUsage, …) - Codeunit 6500 “Item Tracking Management” (3 calls:
GetOrderLinesForPurchaseInvoice → CopyMatchedItemTrkgToPurchLine,GetPurchaseOrderLines → CopyMatchedItemTrkgToPurchLine,GetPurchaseReceiptLines → CopyMatchedItemTrkgToPurchLine) - Codeunit 6503 “Item Tracking Doc. Management” (2 calls:
LoadOneLineForPurchaseInvoice → RetrieveEntriesFromShptRcpt,ValidateQtyToInvoiceForPurchaseInvoice → RetrieveEntriesFromShptRcpt) - Codeunit 90 “Purch.-Post” (2 calls:
ProcessMatchedReceiptOnInvoice → (object),ProcessMatchedReceiptOnInvoice → SetSuppressCommit) - Codeunit 46 “SelectionFilterManagement” (1 call:
ShowItemTrackingEntriesForPurchaseInvoice → GetSelectionFilter) - Codeunit 5402 “Unit of Measure Management” (1 call:
ValidateQtyToInvoiceForPurchaseInvoice → RoundAndValidateQty) - Codeunit 99000834 “Purch. Line-Reserve” (1 call:
ShowItemTrackingEntriesForPurchaseInvoice → CallItemTracking) - Page 136 “Posted Purchase Receipt” (1 call:
ShowPurchaseInvoiceDocument → (object)) - Page 50 “Purchase Order” (1 call:
ShowPurchaseInvoiceDocument → (object))
Called by
- Codeunit 90 “Purch.-Post” (10 calls:
DeleteAfterPosting → DeleteAllMatchedOrderLines,PostItemTrackingForReceipt → IsLineMatchedToReceiptShipment,PostItemTrackingForReceipt → SetMatchedReceiptLinesFilter, …) - Table 39 “Purchase Line” (4 calls:
CheckLineNotShippedOrReceived → IsLineMatched,CopyFromItem → IsReceiptOnInvoiceAllowedForItem,InitHeaderDefaults → IsReceiptOnInvoiceAllowedForLine, …) - Page 5818 “Matched Order Lines” (2 calls:
OnDeleteRecord → LineCanBeDeleted,OnOpenPage → LoadLines) - Report 402 “Purchase Document - Test” (2 calls:
CheckRcptLines → IsLineMatchedToReceiptShipment,CheckRcptLines → SetMatchedReceiptLinesFilter) - Table 121 “Purch. Rcpt. Line” (1 call:
OnDelete → DeleteMatchedLinesForPurchReceipt) - Table 123 “Purch. Inv. Line” (1 call:
OnDelete → DeleteMatchedLinesFromPostedPurchaseInvoice) - Table 38 “Purchase Header” (1 call:
TestPurchLineFieldsBeforeRecreate → IsLineMatched) - Table 5818 “Detailed Matched Order Line” (1 call:
OnDelete → UpdateQtyOnParentLines)
Recent changes
- 2026-12-03 #14613 Receipt on Invoice: posting an invoice matched to only some lines of a purchase order fails (main, BC30, fix)
- 2026-09-14 #11339 Prevent order matching for invoice lines created by Get Receipt Lines (main, BC30, fix)
- 2026-09-08 #11135 Fix dimensions not populated by “Get Order Lines” on Purchase Invoices (main, BC30, fix)
- 2026-09-01 #10700 29.x: PO matching API, E-Documents integration and receipt-on-invoice line tracking (releases/29.x, BC29, feature)
- 2026-08-31 #10528 Track receipt on invoice per purchase order line (main, BC30, feature)
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Combine Receipts or PO Lines on a Single Invoice — possibly related: Documents consolidating purchase order lines on invoices using matched order lines. (model-linked)
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: "Matched Order Line Mgmt."), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.