{"title":"Codeunit 5819 Undo Service Consumption Line, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-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":5819,"name":"Undo Service Consumption Line","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/","path":"src/Layers/W1/BaseApp/Service/History/UndoServiceConsumptionLine.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:27":{"name":"Confirm Management","url":"https://jonas-paprotka.de/ref/codeunit/27-confirm-management/"},"codeunit:5912":{"name":"ServLedgEntries-Post","url":"https://jonas-paprotka.de/ref/codeunit/5912-servledgentries-post/"},"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/"},"codeunit:6484":{"name":"Serv. Undo Posting Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/6484-serv-undo-posting-mgt/"},"codeunit:5817":{"name":"Undo Posting Management","url":"https://jonas-paprotka.de/ref/codeunit/5817-undo-posting-management/"},"table:5991":{"name":"Service Shipment Line","url":"https://jonas-paprotka.de/ref/table/5991-service-shipment-line/"},"codeunit:6503":{"name":"Item Tracking Doc. Management","url":"https://jonas-paprotka.de/ref/codeunit/6503-item-tracking-doc-management/"},"table:83":{"name":"Item Journal Line","url":"https://jonas-paprotka.de/ref/table/83-item-journal-line/"},"table:5990":{"name":"Service Shipment Header","url":"https://jonas-paprotka.de/ref/table/5990-service-shipment-header/"},"codeunit:22":{"name":"Item Jnl.-Post Line","url":"https://jonas-paprotka.de/ref/codeunit/22-item-jnl-post-line/"},"table:207":{"name":"Res. Journal Line","url":"https://jonas-paprotka.de/ref/table/207-res-journal-line/"},"codeunit:212":{"name":"Res. Jnl.-Post Line","url":"https://jonas-paprotka.de/ref/codeunit/212-res-jnl-post-line/"},"codeunit:6500":{"name":"Item Tracking Management","url":"https://jonas-paprotka.de/ref/codeunit/6500-item-tracking-management/"},"table:337":{"name":"Reservation Entry","url":"https://jonas-paprotka.de/ref/table/337-reservation-entry/"},"codeunit:99000831":{"name":"Reservation Engine Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/99000831-reservation-engine-mgt/"},"table:336":{"name":"Tracking Specification","url":"https://jonas-paprotka.de/ref/table/336-tracking-specification/"},"table:313":{"name":"Inventory Setup","url":"https://jonas-paprotka.de/ref/table/313-inventory-setup/"},"codeunit:5894":{"name":"Inventory Adjustment Handler","url":"https://jonas-paprotka.de/ref/codeunit/5894-inventory-adjustment-handler/"}},"procs":[{"name":"OnRun","line":36,"kind":"trigger","steps":[[42,"event","OnBeforeOnRun",1],[50,"ext","codeunit",27,"GetResponseOrDefault",2],[55,"call","Code",0]]},{"name":"Code","line":96,"kind":"procedure","access":"local","params":0,"steps":[[110,"call","CheckServShptLine",1],[113,"ext","codeunit",5912,"InitServiceRegister",2],[119,"write",32,"DeleteAll"],[122,"write",6507,"DeleteAll"],[128,"call","CollectItemLedgerEntries",2],[129,"call","PostItemJnlLine",7],[135,"call","PostResourceJnlLine",1],[136,"call","InsertCorrectiveShipmentLine",2],[138,"ext","codeunit",5912,"ReverseCnsmServLedgEntries",1],[140,"ext","codeunit",5912,"ReverseWarrantyEntry",1],[142,"call","UpdateOrderLine",1],[143,"call","UpdateServShptLine",1],[144,"event","OnCodeOnAfterUpdateServShptLine",0],[147,"ext","codeunit",5912,"FinishServiceRegister",2],[149,"call","MakeInventoryAdjustment",0],[151,"ext","codeunit",7320,"PostTempWhseJnlLine",1],[153,"event","OnAfterCode",0]]},{"name":"CheckServShptLine","line":156,"kind":"procedure","access":"local","params":1,"steps":[[164,"event","OnBeforeCheckServShptLine",1],[183,"ext","codeunit",6484,"TestServShptLine",1],[185,"ext","codeunit",5817,"CollectItemLedgEntries",6],[187,"ext","codeunit",5817,"CheckItemLedgEntries",2]]},{"name":"CollectItemLedgerEntries","line":191,"kind":"procedure","access":"local","params":2,"steps":[[196,"ext","table",5991,"FilterPstdDocLnItemLedgEntries",1],[197,"ext","codeunit",6503,"CopyItemLedgerEntriesToTemp",2],[198,"ext","codeunit",6503,"RetrieveDocumentItemTracking",4]]},{"name":"PostItemJnlLine","line":203,"kind":"procedure","access":"local","params":7,"steps":[[215,"call","GetCorrectiveShptLineNoStep",2],[217,"ext","table",83,"CopyDocumentFields",5],[219,"ext","table",5990,"CopyToItemJnlLine",1],[220,"ext","table",5991,"CopyToItemJnlLineUndo",1],[227,"validate",83,"Applies-from Entry"],[229,"event","OnAfterCopyItemJnlLineFromServShpt",0],[231,"ext","codeunit",7320,"InsertTempWhseJnlLine",8],[236,"ext","codeunit",22,"SetServUndoConsumption",1],[237,"ext","codeunit",22,"RunWithCheck",1],[238,"event","OnItemJnlPostLineOnAfteItemJnlPostLineOnBeforeExit",0],[245,"write",32,"DeleteAll"],[250,"write",32,"Insert"],[252,"call","InsertNewReservationEntries",3],[253,"call","PostItemJnlLineWithIT",7]]},{"name":"PostResourceJnlLine","line":258,"kind":"procedure","access":"local","params":1,"steps":[[265,"event","OnBeforePostResourceJnlLine",1],[273,"ext","table",207,"CopyDocumentFields",4],[275,"ext","table",5990,"CopyToResJournalLine",1],[276,"ext","table",5991,"CopyToResJournalLine",1],[286,"event","OnPostResourceJnlLineOnBeforeResJnlPostLine",0],[287,"ext","codeunit",212,"RunWithCheck",1]]},{"name":"PostItemJnlLineWithIT","line":290,"kind":"procedure","access":"local","params":7,"steps":[[298,"call","GetCorrectiveShptLineNoStep",2],[300,"ext","table",83,"CopyDocumentFields",5],[303,"ext","table",5990,"CopyToItemJnlLine",1],[304,"ext","table",5991,"CopyToItemJnlLineUndo",1],[319,"ext","codeunit",6500,"AdjustQuantityRounding",4],[328,"event","OnBeforePostItemJnlLineWithIT",0],[330,"ext","codeunit",5817,"CollectItemLedgEntries",6],[333,"ext","codeunit",5817,"PostItemJnlLineAppliedToList",6]]},{"name":"InsertNewReservationEntries","line":337,"kind":"procedure","access":"local","params":3,"steps":[[350,"ext","table",337,"CopyTrackingFromItemLedgEntry",1],[362,"validate",337,"Quantity (Base)"],[374,"ext","table",337,"UpdateItemTracking",0],[376,"event","OnBeforeReservEntryInsert",0],[377,"write",337,"Insert"],[379,"write",337,"Insert"],[381,"ext","codeunit",99000831,"UpdateOrderTracking",1]]},{"name":"InsertNewTrackSpecifications","line":384,"kind":"procedure","access":"local","params":2,"steps":[[392,"write",32,"DeleteAll"],[393,"call","CollectItemLedgerEntries",2],[396,"call","InsertOneNewTrackSpec",3],[400,"ext","table",6507,"CopyTrackingFromItemledgEntry",1],[401,"event","OnBeforeTempGlobalItemEntryRelationInsert",0],[402,"write",6507,"Insert"]]},{"name":"InsertOneNewTrackSpec","line":409,"kind":"procedure","access":"local","params":3,"steps":[[437,"validate",336,"Quantity (Base)"],[438,"write",336,"Insert"]]},{"name":"InsertCorrectiveShipmentLine","line":459,"kind":"procedure","access":"local","params":2,"steps":[[464,"event","OnBeforeInsertCorrectiveShipmentLine",0],[466,"call","GetCorrectiveShptLineNoStep",2],[481,"event","OnInsertCorrectiveShipmentLineOnBeforeInsert",0],[482,"write",5991,"Insert"],[484,"call","UpdateItemJnlLine",2],[486,"call","InsertNewTrackSpecifications",2],[487,"call","InsertItemEntryRelation",2]]},{"name":"UpdateOrderLine","line":491,"kind":"procedure","access":"local","params":1,"steps":[[496,"ext","codeunit",6484,"UpdateServLineCnsm",4],[497,"event","OnAfterUpdateOrderLine",0]]},{"name":"UpdateServShptLine","line":500,"kind":"procedure","access":"local","params":1,"steps":[[507,"write",5991,"Modify"]]},{"name":"InsertItemEntryRelation","line":510,"kind":"procedure","access":"local","params":2,"steps":[[517,"ext","table",5991,"TransferToItemEntryRelation",1],[518,"write",6507,"Insert"],[520,"write",6507,"DeleteAll"]]},{"name":"UpdateItemJnlLine","line":523,"kind":"procedure","access":"local","params":2,"steps":[[529,"write",32,"Modify"]]},{"name":"MakeInventoryAdjustment","line":533,"kind":"procedure","access":"local","params":0,"steps":[[539,"ext","table",313,"AutomaticCostAdjmtRequired",0],[540,"ext","codeunit",5894,"MakeInventoryAdjustment",2]]}]}