Codeunit 5813 "Undo Purchase Receipt Line"
Base Application · Microsoft.Purchases.History
Across versions
- BC23present
- BC244 events added, 3 events removed
- BC253 events added, 1 procedures added
- BC263 procedures added
- BC272 procedures removed, 1 events added
- BC284 procedures added, 1 procedures removed
- BC29-30unchanged
Neighbourhood 11 connected objects and pages
Base Application · Microsoft.Purchases.History · BC23-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| TableNo | Purch. Rcpt. Line |
| Permissions | TableData “Purchase Line” = rimd, TableData “Purch. Rcpt. Line” = rimd, TableData “Item Entry Relation” = ri, TableData “Whse. Item Entry Relation” = rimd |
Events published
OnAfterCode(var PurchRcptLine: Record "Purch. Rcpt. Line"; var UndoPostingManagement: Codeunit "Undo Posting Management")(integration)OnAfterCopyItemJnlLineFromPurchRcpt(var ItemJournalLine: Record "Item Journal Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var WhseUndoQty: Codeunit "Whse. Undo Quantity"; var ItemLedgEntryNo: Integer; var NextLineNo: Integer; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; var TempGlobalItemLedgerEntry: Record "Item Ledger Entry" temporary; var TempGlobalItemEntryRelation: Record "Item Entry Relation" temporary; var IsHandled: Boolean)+ BC24 − BC24 (integration)- subscribers: Codeunit 6225 “Sust. Purchase Subscriber” OnAfterCopyItemJnlLineFromPurchRcptForUndoPurchaseReceipt
OnAfterInsertNewReceiptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; PostedWhseReceiptLine: Record "Posted Whse. Receipt Line"; var PostedWhseRcptLineFound: Boolean; DocLineNo: Integer; var PostedWhseRcptLine: Record "Posted Whse. Receipt Line")(integration)OnCodeOnBeforeFindPostedWhseRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var ShouldFindPostedWhseRcptLine: Boolean)+ BC28 (integration)OnAfterNewPurchRcptLineInsert(var NewPurchRcptLine: Record "Purch. Rcpt. Line"; OldPurchRcptLine: Record "Purch. Rcpt. Line"; var TempGlobalItemEntryRelation: Record "Item Entry Relation" temporary; var SkipInsertItemEntryRelation: Boolean)+ BC24 − BC24 (integration)OnAfterPurchRcptLineModify(var PurchRcptLine: Record "Purch. Rcpt. Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; DocLineNo: Integer; var UndoPostingManagement: Codeunit "Undo Posting Management")(integration)OnAfterUpdateOrderLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchLine: Record "Purchase Line")(integration)OnBeforeBlanketOrderInitOutstanding(var BlanketOrderPurchaseLine: Record "Purchase Line"; PurchRcptLine: Record "Purch. Rcpt. Line")(integration)OnBeforeCheckPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean; var TempItemLedgerEntry: Record "Item Ledger Entry" temporary)(integration)OnBeforeCode(var PurchRcptLine: Record "Purch. Rcpt. Line"; var UndoPostingManagement: Codeunit "Undo Posting Management")(integration)OnBeforeCheckPurchRcptLines(var PurchRcptLine: Record "Purch. Rcpt. Line"; var Window: Dialog; var IsHandled: Boolean)(integration)OnBeforeGetCorrectionLineNo(PurchRcptLine: Record "Purch. Rcpt. Line"; var Result: Integer; var IsHandled: Boolean)(integration)OnBeforeNewPurchRcptLineInsert(var NewPurchRcptLine: Record "Purch. Rcpt. Line"; OldPurchRcptLine: Record "Purch. Rcpt. Line")(integration)OnBeforeOnRun(var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean; var SkipTypeCheck: Boolean; var HideDialog: Boolean)(integration)OnBeforePostItemJnlLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; DocLineNo: Integer; var ItemLedgEntryNo: Integer; var IsHandled: Boolean; var NewDocLineNo: Integer; var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary)+ BC24 − BC24 (integration)OnBeforePurchRcptLineModify(var PurchRcptLine: Record "Purch. Rcpt. Line"; var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary)(integration)OnBeforeReapplyJobConsumptionFromApplyToEntryList(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchRcptLine: Record "Purch. Rcpt. Line"; ItemJnlLine: Record "Item Journal Line"; var TempApplyToEntryList: Record "Item Ledger Entry" temporary; var IsHandled: Boolean)(integration)OnBeforeUpdateBlanketOrder(var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean)(integration)OnBeforeUpdateOrderLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean)(integration)OnPostItemJournalInboundItemEntryPostingWithJob(var ItemJournalLine: Record "Item Journal Line"; ItemApplicationEntry: Record "Item Application Entry"; var IsHandled: Boolean)(integration)OnPostItemJnlLineOnAfterCollectItemLedgEntries(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; SourceCodeSetup: Record "Source Code Setup"; var IsHandled: Boolean)(integration)OnPostItemJnlLineOnAfterInsertTempWhseJnlLine(PurchRcptLine: Record "Purch. Rcpt. Line"; var ItemJnlLine: Record "Item Journal Line"; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; var NextLineNo: Integer)(integration)OnPostItemJnlLineOnBeforeUndoPosting(var ItemJournalLine: Record "Item Journal Line"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; SourceCodeSetup: Record "Source Code Setup"; var IsHandled: Boolean)(integration)OnPostItemJnlLineOnBeforeUndoValuePostingWithJob(PurchRcptHeader: Record "Purch. Rcpt. Header"; PurchRcptLine: Record "Purch. Rcpt. Line"; var ItemJnlLine: Record "Item Journal Line"; var IsHandled: Boolean)(integration)OnUpdateOrderLineOnBeforeUpdatePurchLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchaseLine: Record "Purchase Line")(integration)OnCheckPurchRcptLinesAfterPurchRcptLineSetFilters(var PurchRcptLine: Record "Purch. Rcpt. Line")(integration)OnCheckPurchRcptLineOnBeforeCollectItemLedgEntries(var PurchRcptLine: Record "Purch. Rcpt. Line"; var TempItemLedgEntry: Record "Item Ledger Entry" temporary; var IsHandled: Boolean)+ BC24 (integration)OnCodeOnBeforeLoopPurchRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line")+ BC25 (integration)OnBeforeCheckPurchRcptLineFields(var PurchRcptLine: Record "Purch. Rcpt. Line"; var IsHandled: Boolean)+ BC25 Δ BC28 (integration, obsolete 28.0)OnCodeOnBeforeMakeInventoryAdjustment(var PurchaseLine: Record "Purchase Line"; var PurchaseReceiptLine: Record "Purch. Rcpt. Line")+ BC25 (integration)OnUpdateItemJnlLineProdOrderSubcontracting(var ItemJnlLine: Record "Item Journal Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var TempOutputItemLedgerEntry: Record "Item Ledger Entry" temporary; var OneLinePostingUndo: Boolean)+ BC27 (integration)- subscribers: Codeunit 99000784 “Mfg. Undo Purch. Rcpt. Line” OnUpdateItemJnlLineProdOrderSubcontracting
Event subscriptions
- OnSetItemAdjmtPropertiesOnBeforeCheckModifyItem subscribes to Codeunit “Item Jnl.-Post Line” OnSetItemAdjmtPropertiesOnBeforeCheckModifyItem
Procedures
SetHideDialog(NewHideDialog: Boolean)UpdateOrderLine(PurchRcptLine: Record "Purch. Rcpt. Line")UpdateBlanketOrder(PurchRcptLine: Record "Purch. Rcpt. Line")HasInvoicedNotReturnedQuantity(PurchRcptLine: Record "Purch. Rcpt. Line"): BooleanΔ BC24IsUndoSalesShipmentLineForDropShipment(NewUndoSalesShptLineExists: Boolean)+ BC28
Plus 13 local procedures.
Triggers
OnRun
Relations
- runs on Table 121 “Purch. Rcpt. Line”
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 5817 “Undo Posting Management” (14 calls:
CheckPurchRcptLine → CheckItemLedgEntries,CheckPurchRcptLine → CollectItemLedgEntries,CheckPurchRcptLine → CollectOutputItemLedgEntriesForSubcontructingPurcReceiptLine, …) - Codeunit 7320 “Whse. Undo Quantity” (5 calls:
Code → FindPostedWhseRcptLine,Code → PostTempWhseJnlLine,Code → UndoPostedWhseRcptLine, …) - Codeunit 5815 “Undo Sales Shipment Line” (3 calls:
UndoDropShipmentPurchRcptLine → (object),UndoDropShipmentPurchRcptLine → SetCalledFromUndoPurchaseReceiptLine,UndoDropShipmentPurchRcptLine → SetHideDialog) - Codeunit 5402 “Unit of Measure Management” (2 calls:
PostItemJnlLine → CalcBaseQty,UpdateBlanketOrder → QtyRndPrecision) - Codeunit 5894 “Inventory Adjustment Handler” (2 calls:
MakeInventoryAdjustment → MakeAutomaticInventoryAdjustment,MakeInventoryAdjustment → SetJobUpdateProperties) - Codeunit 22 “Item Jnl.-Post Line” (1 call:
PostItemJnlLine → UndoValuePostingWithJob) - Codeunit 5801 “Show Applied Entries” (1 call:
ReapplyJobConsumptionFromApplyToEntryList → FindAppliedEntries)
Called by
- Codeunit 5815 “Undo Sales Shipment Line” (3 calls:
UndoPurchaseReceiptLineForDropShipment → (object),UndoPurchaseReceiptLineForDropShipment → IsUndoSalesShipmentLineForDropShipment,UndoPurchaseReceiptLineForDropShipment → SetHideDialog) - Page 137 “Posted Purchase Rcpt. Subform” (1 call:
UndoReceiptLine → (object))
Recent changes
- 2026-09-17 #11367 [29.X][Repair Item][SaaS][Drop shipment reversal] Undo Shipment fails with blank Bin Code at bin-mandatory location (releases/29.x, BC29, fix)
- 2026-09-14 #11274 [Master]-[Drop shipment reversal] Undo Shipment fails with blank Bin Code at bin-mandatory location (main, BC30, fix)
- 2026-08-18 #10290 [Main] -Drop shipment undo receipt fails for service and non-inventory items. (main, BC30, fix)
- 2026-08-06 #10005 Improve error messages when there are no quantities to reverse in shipped/received lines in Sales/Purchase/Transfer (main, BC30, fix)
Deprecations
- procedure OnBeforeCheckPurchRcptLineFields: Pending 28.0 (#if not CLEAN28), “This event is no longer used.”
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 Purchase Receipt Line"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.