{"title":"Codeunit 5815 Undo Sales Shipment Line, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/5815-undo-sales-shipment-line/points/","author":"JOP-AL","license":"Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-05","object":{"type":"codeunit","id":5815,"name":"Undo Sales Shipment Line","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/5815-undo-sales-shipment-line/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/5815-undo-sales-shipment-line/source/","path":"src/Layers/W1/BaseApp/Sales/History/UndoSalesShipmentLine.Codeunit.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"codeunit:7150":{"name":"Update Item Analysis View","url":"https://jonas-paprotka.de/ref/codeunit/7150-update-item-analysis-view/"},"table:32":{"name":"Item Ledger Entry","url":"https://jonas-paprotka.de/ref/table/32-item-ledger-entry/"},"table:6507":{"name":"Item Entry Relation","url":"https://jonas-paprotka.de/ref/table/6507-item-entry-relation/"},"codeunit:7320":{"name":"Whse. Undo Quantity","url":"https://jonas-paprotka.de/ref/codeunit/7320-whse-undo-quantity/"},"table:111":{"name":"Sales Shipment Line","url":"https://jonas-paprotka.de/ref/table/111-sales-shipment-line/"},"table:339":{"name":"Item Application Entry","url":"https://jonas-paprotka.de/ref/table/339-item-application-entry/"},"codeunit:22":{"name":"Item Jnl.-Post Line","url":"https://jonas-paprotka.de/ref/codeunit/22-item-jnl-post-line/"},"codeunit:5813":{"name":"Undo Purchase Receipt Line","url":"https://jonas-paprotka.de/ref/codeunit/5813-undo-purchase-receipt-line/"},"codeunit:5817":{"name":"Undo Posting Management","url":"https://jonas-paprotka.de/ref/codeunit/5817-undo-posting-management/"},"codeunit:5402":{"name":"Unit of Measure Management","url":"https://jonas-paprotka.de/ref/codeunit/5402-unit-of-measure-management/"},"table:37":{"name":"Sales Line","url":"https://jonas-paprotka.de/ref/table/37-sales-line/"},"codeunit:900":{"name":"Assembly-Post","url":"https://jonas-paprotka.de/ref/codeunit/900-assembly-post/"},"table:900":{"name":"Assembly Header","url":"https://jonas-paprotka.de/ref/table/900-assembly-header/"},"codeunit:5894":{"name":"Inventory Adjustment Handler","url":"https://jonas-paprotka.de/ref/codeunit/5894-inventory-adjustment-handler/"},"table:313":{"name":"Inventory Setup","url":"https://jonas-paprotka.de/ref/table/313-inventory-setup/"}},"procs":[{"name":"OnRun","line":39,"kind":"trigger","steps":[[47,"event","OnBeforeOnRun",1],[52,"call","HandleConfirmMessage",1],[56,"call","Code",0],[57,"ext","codeunit",7150,"UpdateAll",2]]},{"name":"Code","line":113,"kind":"procedure","access":"local","params":0,"steps":[[128,"event","OnCodeOnAfterSalesShptLineSetFilters",0],[136,"call","CheckSalesShptLine",1],[139,"event","OnAfterCheckSalesShipmentLines",0],[144,"event","OnCodeOnBeforeUndoLoop",0],[147,"write",32,"DeleteAll"],[150,"write",6507,"DeleteAll"],[156,"event","OnCodeOnBeforeProcessItemShptEntry",1],[160,"ext","codeunit",7320,"FindPostedWhseShptLine",7],[165,"call","PostItemJnlLine",2],[167,"call","GetCorrectionLineNo",1],[169,"call","InsertNewShipmentLine",3],[170,"event","OnAfterInsertNewShipmentLine",0],[173,"ext","codeunit",7320,"UndoPostedWhseShptLine",1],[176,"ext","codeunit",7320,"PostTempWhseJnlLineCache",2],[178,"call","UndoPostATO",2],[180,"call","UpdateOrderLine",1],[182,"ext","codeunit",7320,"UpdateShptSourceDocLines",1],[185,"call","UpdateBlanketOrder",1],[187,"event","OnBeforeDeleteRelatedItems",0],[194,"event","OnBeforeSalesShptLineModify",0],[195,"write",111,"Modify"],[196,"event","OnAfterSalesShptLineModify",0],[198,"call","UndoFinalizePostATO",1],[202,"call","MakeInventoryAdjustment",0],[204,"event","OnAfterCode",0]]},{"name":"RemoveDropShipmentApplicationWithPurchase","line":207,"kind":"procedure","access":"local","params":2,"steps":[[217,"call","UnApplyDropShipment",3],[219,"call","ApplyFilterForItemTracking",2],[226,"call","UnApplyDropShipment",3],[230,"call","UndoPurchaseReceiptLineForDropShipment",1]]},{"name":"UnApplyDropShipment","line":242,"kind":"procedure","access":"local","params":3,"steps":[[247,"call","FindRelevantNewSalesShptLedgerEntryNo",3],[249,"ext","table",339,"SetBaseLoadFields",0],[253,"event","OnUnApplyDropShipmentOnBeforeFindItemApplicationEntry",0],[255,"ext","codeunit",22,"UnApplyDropShipment",2]]},{"name":"UndoPurchaseReceiptLineForDropShipment","line":279,"kind":"procedure","access":"local","params":1,"steps":[[296,"ext","codeunit",5813,"SetHideDialog",1],[297,"ext","codeunit",5813,"IsUndoSalesShipmentLineForDropShipment",1],[298,"run","codeunit",5813]]},{"name":"CheckSalesShptLine","line":301,"kind":"procedure","access":"local","params":1,"steps":[[310,"event","OnBeforeCheckSalesShptLine",1],[317,"event","OnCheckSalesShptLineOnBeforeHasInvoicedNotReturnedQuantity",1],[320,"call","HasInvoicedNotReturnedQuantity",1],[325,"ext","codeunit",5817,"TestSalesShptLine",1],[328,"event","OnCheckSalesShptLineOnBeforeCollectItemLedgEntries",1],[330,"ext","codeunit",5817,"CollectItemLedgEntries",6],[332,"ext","codeunit",5817,"CheckItemLedgEntries",3],[335,"call","UndoInitPostATO",1],[339,"event","OnAfterCheckSalesShptLine",0]]},{"name":"GetCorrectionLineNo","line":347,"kind":"procedure","params":1,"steps":[[354,"event","OnBeforeGetCorrectionLineNo",1],[370,"event","OnAfterGetCorrectionLineNo",0]]},{"name":"PostItemJnlLine","line":373,"kind":"procedure","access":"local","params":2,"steps":[[386,"event","OnBeforePostItemJnlLine",1],[391,"call","GetCorrectionLineNo",1],[415,"event","OnAfterCopyItemJnlLineFromSalesShpt",1],[419,"ext","codeunit",5817,"CollectItemLedgEntries",6],[423,"ext","codeunit",5817,"AreAllItemEntriesCompletelyInvoiced",1],[425,"ext","codeunit",7320,"InsertTempWhseJnlLine",8],[429,"event","OnPostItemJnlLineOnAfterInsertTempWhseJnlLine",0],[431,"call","GetInvoicedShptEntries",2],[433,"event","OnPostItemJnlLineOnAfterCalcRemQtyBase",0],[439,"event","OnPostItemJnlLineOnBeforeRunItemJnlPostLine",1],[441,"run","codeunit",22],[442,"event","OnPostItemJnlLineOnAfterRunItemJnlPostLine",0],[446,"event","OnItemJnlPostLineOnAfterGetInvoicedShptEntriesOnBeforeExit",0],[450,"ext","codeunit",5817,"PostItemJnlLineAppliedToList",7],[453,"event","OnAfterPostItemJnlLine",0]]},{"name":"InsertNewShipmentLine","line":457,"kind":"procedure","access":"local","params":3,"steps":[[473,"event","OnBeforeNewSalesShptLineInsert",0],[474,"write",111,"Insert"],[475,"event","OnAfterNewSalesShptLineInsert",0],[477,"call","RemoveDropShipmentApplicationWithPurchase",2],[478,"call","InsertItemEntryRelation",2]]},{"name":"UpdateOrderLine","line":485,"kind":"procedure","params":1,"steps":[[491,"event","OnBeforeUpdateOrderLine",1],[496,"event","OnUpdateOrderLineOnBeforeUpdateSalesLine",0],[497,"ext","codeunit",5817,"UpdateSalesLine",4],[500,"event","OnAfterUpdateSalesLine",0]]},{"name":"UpdateBlanketOrder","line":507,"kind":"procedure","params":1,"steps":[[514,"event","OnBeforeUpdateBlanketOrder",1],[533,"ext","codeunit",5402,"QtyRndPrecision",0],[536,"event","OnBeforeBlanketOrderInitOutstanding",0],[537,"ext","table",37,"InitOutstanding",0],[538,"write",37,"Modify"],[540,"ext","codeunit",900,"UpdateBlanketATO",2]]},{"name":"InsertItemEntryRelation","line":544,"kind":"procedure","access":"local","params":2,"steps":[[551,"ext","table",6507,"TransferFieldsSalesShptLine",1],[552,"write",6507,"Insert"]]},{"name":"UndoInitPostATO","line":556,"kind":"procedure","access":"local","params":1,"steps":[[560,"ext","table",111,"AsmToShipmentExists",1],[561,"call","OpenATOProgressWindow",3],[562,"ext","codeunit",900,"UndoInitPostATO",1]]},{"name":"UndoPostATO","line":567,"kind":"procedure","access":"local","params":2,"steps":[[571,"ext","table",111,"AsmToShipmentExists",1],[572,"call","OpenATOProgressWindow",3],[573,"ext","codeunit",900,"UndoPostATO",4]]},{"name":"UndoFinalizePostATO","line":578,"kind":"procedure","access":"local","params":1,"steps":[[582,"ext","table",111,"AsmToShipmentExists",1],[583,"call","OpenATOProgressWindow",3],[584,"ext","codeunit",900,"UndoFinalizePostATO",1],[585,"call","SynchronizeATO",1]]},{"name":"SynchronizeATO","line":590,"kind":"procedure","access":"local","params":1,"steps":[[597,"ext","table",37,"AsmToOrderExists",1],[599,"write",900,"Modify"],[600,"ext","table",37,"AutoAsmToOrder",0],[602,"write",900,"Modify"],[604,"ext","table",37,"AutoAsmToOrder",0],[606,"event","OnSynchronizeATOOnBeforeModify",0],[607,"write",37,"Modify",1]]},{"name":"GetInvoicedShptEntries","line":625,"kind":"procedure","params":2,"steps":[[631,"ext","table",32,"SetTrackingFilterBlank",0],[633,"event","OnGetInvoicedShptEntriesOnAfterSetFilters",0]]},{"name":"HasInvoicedNotReturnedQuantity","line":637,"kind":"procedure","access":"local","params":1,"steps":[[654,"ext","table",339,"AppliedInbndEntryExists",2],[658,"call","IsCancelled",1],[670,"call","IsSalesInvoiceCancelled",1]]},{"name":"IsSalesInvoiceCancelled","line":702,"kind":"procedure","access":"local","params":1,"steps":[[707,"event","OnAfterIsSalesInvoiceCancelled",0]]},{"name":"MakeInventoryAdjustment","line":710,"kind":"procedure","access":"local","params":0,"steps":[[714,"ext","codeunit",5894,"SetJobUpdateProperties",1],[715,"ext","codeunit",5894,"MakeAutomaticInventoryAdjustment",1]]},{"name":"HandleConfirmMessage","line":727,"kind":"procedure","access":"local","params":1,"steps":[[729,"call","IsCancelledSalesInvoice",1]]},{"name":"OnSetItemAdjmtPropertiesOnBeforeCheckModifyItem","line":736,"kind":"procedure","access":"local","params":1,"steps":[[740,"ext","table",313,"UseLegacyPosting",0]]}]}