Codeunit 5817 "Undo Posting Management"
Base Application · Microsoft.Inventory
Across versions
- BC23-24present
- BC2510 procedures added, 9 events added
- BC261 procedures added
- BC272 events added
- BC288 procedures removed, 5 events removed
- BC29unchanged
- BC305 procedures added, 5 procedures removed
Neighbourhood 27 connected objects and pages
Base Application · Microsoft.Inventory · BC23-30 · source at 4e6a307c · facts from BC29
Properties
| Property | Value |
|---|---|
| Permissions | TableData “Reservation Entry” = i |
Events published
OnAfterRevertPostedItemTracking(var TempReservEntry: Record "Reservation Entry" temporary)(integration)OnAfterUpdateTransLine(var TransferLine: Record "Transfer Line")(integration)OnAfterUpdateSalesLine(var SalesLine: Record "Sales Line")(integration)OnAfterUpdatePurchline(var PurchLine: Record "Purchase Line")(integration)OnBeforeAdjustQuantityRounding(var ItemJnlLine: Record "Item Journal Line"; var NonDistrQuantity: Decimal; NonDistrQuantityBase: Decimal; var IsHandled: Boolean)(integration)OnBeforeCollectItemLedgEntries(var TempItemLedgEntry: Record "Item Ledger Entry" temporary; SourceType: Integer; DocumentNo: Code[20]; LineNo: Integer; BaseQty: Decimal; EntryReference: Integer; var IsHandled: Boolean)+ BC28 (integration)OnBeforeCheckMissingItemLedgers(var TempItemLedgEntry: Record "Item Ledger Entry" temporary; SourceType: Integer; DocumentNo: Code[20]; LineNo: Integer; BaseQty: Decimal; var IsHandled: Boolean)(integration)OnBeforeCheckItemLedgEntries(var TempItemLedgEntry: Record "Item Ledger Entry" temporary; LineRef: Integer; InvoicedEntry: Boolean; var IsHandled: Boolean)(integration)OnBeforeCheckValueEntries(var TempItemLedgEntry: Record "Item Ledger Entry" temporary; LineRef: Integer; InvoicedEntry: Boolean; var IsHandled: Boolean)(integration)OnBeforePostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; TempApplyToItemLedgEntry: Record "Item Ledger Entry" temporary)(integration)OnBeforePostItemJnlLineForJob(var ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)(integration)OnBeforePostItemJnlLineAppliedToList(ItemJnlLine: Record "Item Journal Line"; var TempApplyToItemLedgEntry: Record "Item Ledger Entry" temporary; UndoQty: Decimal; UndoQtyBase: Decimal; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemEntryRelation: Record "Item Entry Relation" temporary; InvoicedEntry: Boolean; var IsHandled: Boolean)(integration)OnBeforeReapplyJobConsumption(ItemRcptEntryNo: Integer; var IsHandled: Boolean)+ BC30 − BC30 (integration)OnBeforeRevertPostedItemTracking(var TempItemLedgerEntry: Record "Item Ledger Entry" temporary; AvailabilityDate: Date; RevertInvoiced: Boolean; var IsHandled: Boolean)(integration)OnBeforeRevertPostedItemTrackingFromPurchLine(PurchLine: Record "Purchase Line"; var TempUndoneItemLedgEntry: Record "Item Ledger Entry" temporary; var IsHandled: Boolean)(integration)OnBeforePurchLineReserveVerifyQuantity(PurchLine: Record "Purchase Line"; xPurchLine: Record "Purchase Line"; var IsHandled: Boolean)(integration)OnBeforeRevertPostedItemTrackingFromSalesLine(SalesLine: Record "Sales Line"; var TempUndoneItemLedgEntry: Record "Item Ledger Entry" temporary; var IsHandled: Boolean)(integration)OnBeforeSalesLineReserveVerifyQuantity(SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var IsHandled: Boolean)(integration)OnBeforeTestAllTransactions(UndoType: Integer; UndoID: Code[20]; UndoLineNo: Integer; SourceType: Integer; SourceSubtype: Integer; SourceID: Code[20]; SourceRefNo: Integer)(integration)OnBeforeTestTransferShptLine(var TransferShipmentLine: Record "Transfer Shipment Line"; var IsHandled: Boolean)(integration)OnBeforeTestPostedInvtPickLine(UndoLineNo: Integer; SourceType: Integer; SourceSubtype: Integer; SourceID: Code[20]; SourceRefNo: Integer; var IsHandled: Boolean; UndoType: Integer; UndoID: Code[20])(integration)OnBeforeTestPostedInvtPutAwayLine(UndoLineNo: Integer; SourceType: Integer; SourceSubtype: Integer; SourceID: Code[20]; SourceRefNo: Integer; var IsHandled: Boolean; UndoType: Integer; UndoID: Code[20])(integration)OnBeforeTestPostedWhseShipmentLine(UndoLineNo: Integer; SourceType: Integer; SourceSubtype: Integer; SourceID: Code[20]; SourceRefNo: Integer; var IsHandled: Boolean; UndoType: Integer; UndoID: Code[20])(integration)OnBeforeTestRgstrdWhseActivityLine(UndoLineNo: Integer; SourceType: Integer; SourceSubtype: Integer; SourceID: Code[20]; SourceRefNo: Integer; var IsHandled: Boolean)(integration)OnBeforeTestWarehouseActivityLine(UndoType: Option; UndoLineNo: Integer; SourceType: Integer; SourceSubtype: Integer; SourceID: Code[20]; SourceRefNo: Integer; var IsHandled: Boolean)(integration)OnBeforeTestWarehouseEntry(UndoLineNo: Integer; var PostedWhseReceiptLine: Record "Posted Whse. Receipt Line"; var IsHandled: Boolean)(integration)OnBeforeTestWarehouseReceiptLine(UndoLineNo: Integer; SourceType: Integer; SourceSubtype: Integer; SourceID: Code[20]; SourceRefNo: Integer; var IsHandled: Boolean)(integration)OnBeforeTestWarehouseShipmentLine(UndoLineNo: Integer; SourceType: Integer; SourceSubtype: Integer; SourceID: Code[20]; SourceRefNo: Integer; var IsHandled: Boolean)(integration)OnBeforeTestWhseWorksheetLine(UndoLineNo: Integer; SourceType: Integer; SourceSubtype: Integer; SourceID: Code[20]; SourceRefNo: Integer; var IsHandled: Boolean)(integration)OnBeforeUndoValuePostingFromJob(var ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)(integration)OnCheckItemLedgEntriesOnBeforeCheckTempItemLedgEntry(var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var IsHandled: Boolean)(integration)OnPostItemJnlLineAppliedToListOnBeforeTempItemEntryRelationInsert(var TempItemEntryRelation: Record "Item Entry Relation" temporary; ItemJournalLine: Record "Item Journal Line")(integration)OnPostItemJnlLineAppliedToListOnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; TempApplyToItemLedgEntry: Record "Item Ledger Entry" temporary)(integration)OnPostItemJnlLineAppliedToListOnAfterSetInvoicedQty(var ItemJournalLine: Record "Item Journal Line"; TempApplyToItemLedgEntry: Record "Item Ledger Entry" temporary)+ BC27 (integration)- subscribers: Codeunit 6225 “Sust. Purchase Subscriber” OnPostItemJnlLineAppliedToListOnAfterSetInvoicedQty, Codeunit 6253 “Sust. Sales Subscriber” OnPostItemJnlLineAppliedToListOnAfterSetInvoicedQty, Codeunit 6285 “Sust. Service Subscriber” OnPostItemJnlLineAppliedToListOnAfterSetInvoicedQty, Codeunit 99000784 “Mfg. Undo Purch. Rcpt. Line” OnPostItemJnlLineAppliedToListOnAfterSetInvoicedQty
OnUpdateSalesLineOnBeforeInitOustanding(var SalesLine: Record "Sales Line"; var UndoQty: Decimal; var UndoQtyBase: Decimal)(integration)- subscribers: Codeunit 8063 “Sales Documents” UpdateInvoicedQtyOnSalesLineAfterUndoShipment
OnPostItemJnlLineOnBeforePostJobConsumption(var ItemJnlLine2: Record "Item Journal Line"; var IsHandled: Boolean)(integration)OnPostItemJnlLineOnBeforePostItemJnlLineForJob(var ItemJnlLine2: Record "Item Journal Line"; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line"; var PostJobConsumptionBeforePurch: Boolean)(integration)OnBeforeTestWarehouseActivityLine2(var WarehouseActivityLine: Record "Warehouse Activity Line"; var IsHandled: Boolean)(integration)OnRevertPostedItemTrackingOnBeforeReservEntryInsert(var ReservationEntry: Record "Reservation Entry"; var TempItemLedgerEntry: Record "Item Ledger Entry" temporary)(integration)OnTestWarehouseEntryOnAfterSetFilters(var WarehouseEntry: Record "Warehouse Entry"; PostedWhseReceiptLine: Record "Posted Whse. Receipt Line")(integration)OnUpdatePurchLineOnAfterSetQtyToShip(var PurchLine: Record "Purchase Line")(integration)OnUpdatePurchLineOnAfterSetQtyToReceive(var PurchLine: Record "Purchase Line")(integration)OnUpdatePurchLineOnBeforePurchLineModify(var PurchLine: Record "Purchase Line")(integration)OnUpdateSalesLineOnBeforeSalesLineModify(var SalesLine: Record "Sales Line")(integration)- subscribers: Codeunit 8063 “Sales Documents” RevertInvoicedQuantityOnUpdateSalesLineOnBeforeSalesLineModify
OnBeforeUpdatePurchLine(PurchaseLine: Record "Purchase Line"; var UndoQty: Decimal; var UndoQtyBase: Decimal; var TempUndoneItemLedgEntry: Record "Item Ledger Entry" temporary; var IsHandled: Boolean)(integration)OnAfterTestAllTransactions(UndoType: Integer; UndoID: Code[20]; UndoLineNo: Integer; SourceType: Integer; SourceSubtype: Integer; SourceID: Code[20]; SourceRefNo: Integer)(integration)OnBeforeUpdateTransLine(TransLine: Record "Transfer Line"; var UndoQty: Decimal; var UndoQtyBase: Decimal; var TempUndoneItemLedgEntry: Record "Item Ledger Entry" temporary; var IsHandled: Boolean)(integration)OnBeforeUpdateSalesLine(SalesLine: Record "Sales Line"; var UndoQty: Decimal; var UndoQtyBase: Decimal; var TempUndoneItemLedgEntry: Record "Item Ledger Entry" temporary; var IsHandled: Boolean)(integration)OnRevertPostedItemTrackingOnBeforeUpdateReservEntry(var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TrackingSpecification: Record "Tracking Specification"; var IsHandled: Boolean)(integration)OnTestAllTransactionsOnBeforeTestWarehouseActivityLine(UndoType: Integer; UndoID: Code[20]; UndoLineNo: Integer; SourceType: Integer; SourceSubtype: Integer; SourceID: Code[20]; SourceRefNo: Integer; var IsHandled: Boolean)(integration)OnUpdateSalesLineOnAfterUpdateWithWarehouseShipForReturnOrder(var SalesLine: Record "Sales Line")(integration)OnBeforeTestRgstrdWhseActivityLine2(var PostedWhseReceiptLine: Record "Posted Whse. Receipt Line"; var IsHandled: Boolean)(integration)OnShouldRevertBaseQtySign(SourceType: Integer; var RevertSign: Boolean)+ BC25 (integration)- subscribers: Codeunit 6484 “Serv. Undo Posting Mgt.” OnShouldCollectSourceType
OnSkipTestWarehouseShipmentLine(UndoType: Integer; var SkipTest: Boolean)+ BC25 (integration)- subscribers: Codeunit 6484 “Serv. Undo Posting Mgt.” OnSkipTestWarehouseShipmentLine
OnRevertPostedItemTrackingOnBeforeGetTrackingSpecification(var TempItemLedgerEntry: Record "Item Ledger Entry" temporary; var IsHandled: Boolean)+ BC25 (integration)OnUpdateDerivedTransferLineOnAfterTransferTracking(var TransferLine: Record "Transfer Line"; var TransferShipmentLine: Record "Transfer Shipment Line"; var DerivedTransferLine: Record "Transfer Line")+ BC25 (integration)OnCollectOutputItemLedgEntriesForSubcontructingPurcReceiptLine(var TempItemLedgerEntry: Record "Item Ledger Entry" temporary; PurchRcptLine: Record "Purch. Rcpt. Line"; var Result: Boolean)+ BC27 (integration)- subscribers: Codeunit 99000784 “Mfg. Undo Purch. Rcpt. Line” OnCollectOutputItemLedgEntriesForSubcontructingPurcReceiptLine
OnPostItemJnlLineAppliedToListOnAfterInsertTempItemLedgEntry(var ItemJournalLine: Record "Item Journal Line"; TempApplyToItemLedgerEntry: Record "Item Ledger Entry" temporary)+ BC28 (integration)
Procedures
TestTransferShptLine(TransferShptLine: Record "Transfer Shipment Line")TestSalesShptLine(SalesShptLine: Record "Sales Shipment Line")TestPurchRcptLine(PurchRcptLine: Record "Purch. Rcpt. Line")TestReturnShptLine(ReturnShptLine: Record "Return Shipment Line")TestReturnRcptLine(ReturnRcptLine: Record "Return Receipt Line")TestAsmHeader(PostedAsmHeader: Record "Posted Assembly Header")TestAsmLine(PostedAsmLine: Record "Posted Assembly Line")RunTestAllTransactions(UndoType: Integer; UndoID: Code[20]; UndoLineNo: Integer; SourceType: Integer; SourceSubtype: Integer; SourceID: Code[20]; SourceRefNo: Integer)TestAllTransactions(UndoType: Integer; UndoID: Code[20]; UndoLineNo: Integer; SourceType: Integer; SourceSubtype: Integer; SourceID: Code[20]; SourceRefNo: Integer)Δ BC25CheckItemLedgEntries(var TempItemLedgEntry: Record "Item Ledger Entry" temporary; LineRef: Integer)CheckItemLedgEntries(var TempItemLedgEntry: Record "Item Ledger Entry" temporary; LineRef: Integer; InvoicedEntry: Boolean)PostItemJnlLineAppliedToList(ItemJnlLine: Record "Item Journal Line"; var TempApplyToItemLedgEntry: Record "Item Ledger Entry" temporary; UndoQty: Decimal; UndoQtyBase: Decimal; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemEntryRelation: Record "Item Entry Relation" temporary)PostItemJnlLineAppliedToList(ItemJnlLine: Record "Item Journal Line"; var TempApplyToItemLedgEntry: Record "Item Ledger Entry" temporary; UndoQty: Decimal; UndoQtyBase: Decimal; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var TempItemEntryRelation: Record "Item Entry Relation" temporary; InvoicedEntry: Boolean)AreAllItemEntriesCompletelyInvoiced(var TempApplyToItemLedgEntry: Record "Item Ledger Entry" temporary): BooleanCollectItemLedgEntries(var TempItemLedgEntry: Record "Item Ledger Entry" temporary; SourceType: Integer; DocumentNo: Code[20]; LineNo: Integer; BaseQty: Decimal; EntryRef: Integer)CollectOutputItemLedgEntriesForSubcontructingPurcReceiptLine(var TempItemLedgEntry: Record "Item Ledger Entry" temporary; PurchRcptLine: Record "Purch. Rcpt. Line"): Boolean+ BC26 (internal)UpdatePurchLine(PurchLine: Record "Purchase Line"; UndoQty: Decimal; UndoQtyBase: Decimal; var TempUndoneItemLedgEntry: Record "Item Ledger Entry" temporary)UpdateSalesLine(SalesLine: Record "Sales Line"; UndoQty: Decimal; UndoQtyBase: Decimal; var TempUndoneItemLedgEntry: Record "Item Ledger Entry" temporary)UpdateDerivedTransferLine(var TransferLine: Record "Transfer Line"; var TransferShptLine: Record "Transfer Shipment Line")(internal)UpdateTransLine(TransferLine: Record "Transfer Line"; UndoQty: Decimal; UndoQtyBase: Decimal; var TempUndoneItemLedgEntry: Record "Item Ledger Entry" temporary)RevertPostedItemTracking(var TempItemLedgEntry: Record "Item Ledger Entry" temporary; AvailabilityDate: Date; RevertInvoiced: Boolean)PostItemJnlLine(var ItemJnlLine: Record "Item Journal Line")TransferSourceValues(var ItemJnlLine: Record "Item Journal Line"; EntryNo: Integer)+ BC30 − BC30ReapplyJobConsumption(ItemRcptEntryNo: Integer)+ BC30 − BC30FindItemReceiptApplication(var ItemApplnEntry: Record "Item Application Entry"; ItemRcptEntryNo: Integer)+ BC30 − BC30FindItemShipmentApplication(var ItemApplnEntry: Record "Item Application Entry"; ItemShipmentEntryNo: Integer)+ BC30 − BC30UpdatePurchaseLineOverRcptQty(PurchaseLine: Record "Purchase Line"; OverRcptQty: Decimal)UpdateWarehouseRequest(SourceType: Integer; SourceSubtype: Integer; SourceNo: Code[20]; LocationCode: Code[10])Δ BC25
Plus 36 local procedures.
Triggers
OnRun
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 22 “Item Jnl.-Post Line” (5 calls:
PostItemJnlLine → (object),PostItemJnlLineForJob → (object),ReapplyJobConsumption → ReApply, …) - Codeunit 6500 “Item Tracking Management” (4 calls:
AdjustQuantityRounding → AdjustQuantityRounding,CheckMissingItemLedgers → CollectItemEntryRelation,TransferTracking → ComposeRowID, …) - Codeunit 5775 “Whse. Management” (2 calls:
TestPostedWhseShipmentLine → SetSourceFilterForPostedWhseShptLine,TestWarehouseReceiptLine → SetSourceFilterForWhseRcptLine) - Codeunit 99000836 “Transfer Line-Reserve” (2 calls:
TransferLineReserveVerifyQuantity → VerifyQuantity,TransferTracking → FindReservEntrySet) - Codeunit 5760 “Whse.-Post Receipt” (1 call:
TestWarehouseEntry → IsReceiptForJob) - Codeunit 7320 “Whse. Undo Quantity” (1 call:
TestPostedWhseReceiptLine → FindPostedWhseRcptLine) - Codeunit 99000830 “Create Reserv. Entry” (1 call:
UpdateTransferQuantity → TransferReservEntry) - Codeunit 99000831 “Reservation Engine Mgt.” (1 call:
RevertPostedItemTracking → UpdateOrderTracking) - Codeunit 99000832 “Sales Line-Reserve” (1 call:
SalesLineReserveVerifyQuantity → VerifyQuantity) - Codeunit 99000834 “Purch. Line-Reserve” (1 call:
PurchLineReserveVerifyQuantity → VerifyQuantity)
Called by
- Codeunit 5813 “Undo Purchase Receipt Line” (14 calls:
CheckPurchRcptLine → CheckItemLedgEntries,CheckPurchRcptLine → CollectItemLedgEntries,CheckPurchRcptLine → CollectOutputItemLedgEntriesForSubcontructingPurcReceiptLine, …) - Codeunit 5814 “Undo Return Shipment Line” (8 calls:
CheckReturnShptLine → CheckItemLedgEntries,CheckReturnShptLine → CollectItemLedgEntries,CheckReturnShptLine → TestReturnShptLine, …) - Codeunit 5815 “Undo Sales Shipment Line” (7 calls:
CheckSalesShptLine → CheckItemLedgEntries,CheckSalesShptLine → CollectItemLedgEntries,CheckSalesShptLine → TestSalesShptLine, …) - Codeunit 5816 “Undo Return Receipt Line” (6 calls:
CheckReturnRcptLine → CheckItemLedgEntries,CheckReturnRcptLine → CollectItemLedgEntries,CheckReturnRcptLine → TestReturnRcptLine, …) - Codeunit 9030 “Undo Transfer Shipment” (6 calls:
CheckTransferShptLine → CheckItemLedgEntries,CheckTransferShptLine → CollectItemLedgEntries,CheckTransferShptLine → TestTransferShptLine, …) - Codeunit 900 “Assembly-Post” (5 calls:
CheckPossibleToUndo → CheckItemLedgEntries,CheckPossibleToUndo → CollectItemLedgEntries,CheckPossibleToUndo → TestAsmHeader, …) - Codeunit 5818 “Undo Service Shipment Line” (4 calls:
CheckServShptLine → CheckItemLedgEntries,CheckServShptLine → CollectItemLedgEntries,PostItemJnlLine → CollectItemLedgEntries, …) - Codeunit 5819 “Undo Service Consumption Line” (4 calls:
CheckServShptLine → CheckItemLedgEntries,CheckServShptLine → CollectItemLedgEntries,PostItemJnlLineWithIT → CollectItemLedgEntries, …) - Codeunit 6484 “Serv. Undo Posting Mgt.” (4 calls:
RevertPostedItemTrackingFromServiceLine → RevertPostedItemTracking,TestServShptLine → TestAllTransactions,UpdateServLine → UpdateWarehouseRequest, …) - Codeunit 1303 “Correct Posted Sales Invoice” (2 calls:
UpdateSalesOrderLinesFromCancelledInvoice → RevertPostedItemTracking,UpdateSalesOrderLinesFromCreditMemo → RevertPostedItemTracking) - Codeunit 1313 “Correct Posted Purch. Invoice” (2 calls:
UpdatePurchaseOrderLinesFromCancelledInvoice → RevertPostedItemTracking,UpdatePurchaseOrderLinesFromCreditMemo → RevertPostedItemTracking)
Recent changes
- 2026-12-03 #11156 Allow controlled changes to item tracking codes (main, BC30, feature)
- 2026-08-20 #10254 Fix 644744: Undo subcontracting receipt keys Item Entry Relation with Capacity Ledger Entry No. (main, BC30, fix)
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Design details - Inventory posting — possibly related: Documents inventory posting structure with item ledger and value entries. (model-linked)
- Design details - Item tracking posting structure — possibly related: Documents item tracking posting structure and entry relations for posted documents. (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: "Undo Posting Management"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.