---
title: "Codeunit 5819 Undo Service Consumption Line, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/points/
object: https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/
app: "Base Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
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/"
---

# Codeunit 5819 Undo Service Consumption Line, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/points/

16 procedures and triggers with a step in src/Layers/W1/BaseApp/Service/History/UndoServiceConsumptionLine.Codeunit.al, in source order, read from the text, not from a run.

## OnRun

[Line 36](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L36), trigger.

- [42](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L42) raises `OnBeforeOnRun`, IsHandled
- [50](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L50) calls [Codeunit 27 Confirm Management](https://jonas-paprotka.de/ref/codeunit/27-confirm-management/) `GetResponseOrDefault`
- [55](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L55) calls `Code`

## Code

[Line 96](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L96), local.

- [110](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L110) calls `CheckServShptLine`
- [113](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L113) calls [Codeunit 5912 ServLedgEntries-Post](https://jonas-paprotka.de/ref/codeunit/5912-servledgentries-post/) `InitServiceRegister`
- [119](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L119) writes [Table 32 Item Ledger Entry](https://jonas-paprotka.de/ref/table/32-item-ledger-entry/) DeleteAll
- [122](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L122) writes [Table 6507 Item Entry Relation](https://jonas-paprotka.de/ref/table/6507-item-entry-relation/) DeleteAll
- [128](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L128) calls `CollectItemLedgerEntries`
- [129](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L129) calls `PostItemJnlLine`
- [135](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L135) calls `PostResourceJnlLine`
- [136](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L136) calls `InsertCorrectiveShipmentLine`
- [138](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L138) calls [Codeunit 5912 ServLedgEntries-Post](https://jonas-paprotka.de/ref/codeunit/5912-servledgentries-post/) `ReverseCnsmServLedgEntries`
- [140](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L140) calls [Codeunit 5912 ServLedgEntries-Post](https://jonas-paprotka.de/ref/codeunit/5912-servledgentries-post/) `ReverseWarrantyEntry`
- [142](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L142) calls `UpdateOrderLine`
- [143](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L143) calls `UpdateServShptLine`
- [144](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L144) raises `OnCodeOnAfterUpdateServShptLine`
- [147](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L147) calls [Codeunit 5912 ServLedgEntries-Post](https://jonas-paprotka.de/ref/codeunit/5912-servledgentries-post/) `FinishServiceRegister`
- [149](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L149) calls `MakeInventoryAdjustment`
- [151](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L151) calls [Codeunit 7320 Whse. Undo Quantity](https://jonas-paprotka.de/ref/codeunit/7320-whse-undo-quantity/) `PostTempWhseJnlLine`
- [153](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L153) raises `OnAfterCode`

## CheckServShptLine

[Line 156](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L156), local.

- [164](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L164) raises `OnBeforeCheckServShptLine`, IsHandled
- [183](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L183) calls [Codeunit 6484 Serv. Undo Posting Mgt.](https://jonas-paprotka.de/ref/codeunit/6484-serv-undo-posting-mgt/) `TestServShptLine`
- [185](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L185) calls [Codeunit 5817 Undo Posting Management](https://jonas-paprotka.de/ref/codeunit/5817-undo-posting-management/) `CollectItemLedgEntries`
- [187](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L187) calls [Codeunit 5817 Undo Posting Management](https://jonas-paprotka.de/ref/codeunit/5817-undo-posting-management/) `CheckItemLedgEntries`

## CollectItemLedgerEntries

[Line 191](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L191), local.

- [196](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L196) calls [Table 5991 Service Shipment Line](https://jonas-paprotka.de/ref/table/5991-service-shipment-line/) `FilterPstdDocLnItemLedgEntries`
- [197](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L197) calls [Codeunit 6503 Item Tracking Doc. Management](https://jonas-paprotka.de/ref/codeunit/6503-item-tracking-doc-management/) `CopyItemLedgerEntriesToTemp`
- [198](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L198) calls [Codeunit 6503 Item Tracking Doc. Management](https://jonas-paprotka.de/ref/codeunit/6503-item-tracking-doc-management/) `RetrieveDocumentItemTracking`

## PostItemJnlLine

[Line 203](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L203), local.

- [215](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L215) calls `GetCorrectiveShptLineNoStep`
- [217](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L217) calls [Table 83 Item Journal Line](https://jonas-paprotka.de/ref/table/83-item-journal-line/) `CopyDocumentFields`
- [219](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L219) calls [Table 5990 Service Shipment Header](https://jonas-paprotka.de/ref/table/5990-service-shipment-header/) `CopyToItemJnlLine`
- [220](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L220) calls [Table 5991 Service Shipment Line](https://jonas-paprotka.de/ref/table/5991-service-shipment-line/) `CopyToItemJnlLineUndo`
- [227](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L227) validates [Table 83 Item Journal Line](https://jonas-paprotka.de/ref/table/83-item-journal-line/) `Applies-from Entry`
- [229](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L229) raises `OnAfterCopyItemJnlLineFromServShpt`
- [231](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L231) calls [Codeunit 7320 Whse. Undo Quantity](https://jonas-paprotka.de/ref/codeunit/7320-whse-undo-quantity/) `InsertTempWhseJnlLine`
- [236](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L236) calls [Codeunit 22 Item Jnl.-Post Line](https://jonas-paprotka.de/ref/codeunit/22-item-jnl-post-line/) `SetServUndoConsumption`
- [237](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L237) calls [Codeunit 22 Item Jnl.-Post Line](https://jonas-paprotka.de/ref/codeunit/22-item-jnl-post-line/) `RunWithCheck`
- [238](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L238) raises `OnItemJnlPostLineOnAfteItemJnlPostLineOnBeforeExit`
- [245](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L245) writes [Table 32 Item Ledger Entry](https://jonas-paprotka.de/ref/table/32-item-ledger-entry/) DeleteAll
- [250](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L250) writes [Table 32 Item Ledger Entry](https://jonas-paprotka.de/ref/table/32-item-ledger-entry/) Insert
- [252](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L252) calls `InsertNewReservationEntries`
- [253](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L253) calls `PostItemJnlLineWithIT`

## PostResourceJnlLine

[Line 258](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L258), local.

- [265](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L265) raises `OnBeforePostResourceJnlLine`, IsHandled
- [273](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L273) calls [Table 207 Res. Journal Line](https://jonas-paprotka.de/ref/table/207-res-journal-line/) `CopyDocumentFields`
- [275](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L275) calls [Table 5990 Service Shipment Header](https://jonas-paprotka.de/ref/table/5990-service-shipment-header/) `CopyToResJournalLine`
- [276](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L276) calls [Table 5991 Service Shipment Line](https://jonas-paprotka.de/ref/table/5991-service-shipment-line/) `CopyToResJournalLine`
- [286](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L286) raises `OnPostResourceJnlLineOnBeforeResJnlPostLine`
- [287](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L287) calls [Codeunit 212 Res. Jnl.-Post Line](https://jonas-paprotka.de/ref/codeunit/212-res-jnl-post-line/) `RunWithCheck`

## PostItemJnlLineWithIT

[Line 290](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L290), local.

- [298](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L298) calls `GetCorrectiveShptLineNoStep`
- [300](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L300) calls [Table 83 Item Journal Line](https://jonas-paprotka.de/ref/table/83-item-journal-line/) `CopyDocumentFields`
- [303](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L303) calls [Table 5990 Service Shipment Header](https://jonas-paprotka.de/ref/table/5990-service-shipment-header/) `CopyToItemJnlLine`
- [304](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L304) calls [Table 5991 Service Shipment Line](https://jonas-paprotka.de/ref/table/5991-service-shipment-line/) `CopyToItemJnlLineUndo`
- [319](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L319) calls [Codeunit 6500 Item Tracking Management](https://jonas-paprotka.de/ref/codeunit/6500-item-tracking-management/) `AdjustQuantityRounding`
- [328](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L328) raises `OnBeforePostItemJnlLineWithIT`
- [330](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L330) calls [Codeunit 5817 Undo Posting Management](https://jonas-paprotka.de/ref/codeunit/5817-undo-posting-management/) `CollectItemLedgEntries`
- [333](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L333) calls [Codeunit 5817 Undo Posting Management](https://jonas-paprotka.de/ref/codeunit/5817-undo-posting-management/) `PostItemJnlLineAppliedToList`

## InsertNewReservationEntries

[Line 337](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L337), local.

- [350](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L350) calls [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) `CopyTrackingFromItemLedgEntry`
- [362](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L362) validates [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) `Quantity (Base)`
- [374](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L374) calls [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) `UpdateItemTracking`
- [376](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L376) raises `OnBeforeReservEntryInsert`
- [377](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L377) writes [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) Insert
- [379](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L379) writes [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) Insert
- [381](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L381) calls [Codeunit 99000831 Reservation Engine Mgt.](https://jonas-paprotka.de/ref/codeunit/99000831-reservation-engine-mgt/) `UpdateOrderTracking`

## InsertNewTrackSpecifications

[Line 384](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L384), local.

- [392](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L392) writes [Table 32 Item Ledger Entry](https://jonas-paprotka.de/ref/table/32-item-ledger-entry/) DeleteAll
- [393](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L393) calls `CollectItemLedgerEntries`
- [396](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L396) calls `InsertOneNewTrackSpec`
- [400](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L400) calls [Table 6507 Item Entry Relation](https://jonas-paprotka.de/ref/table/6507-item-entry-relation/) `CopyTrackingFromItemledgEntry`
- [401](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L401) raises `OnBeforeTempGlobalItemEntryRelationInsert`
- [402](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L402) writes [Table 6507 Item Entry Relation](https://jonas-paprotka.de/ref/table/6507-item-entry-relation/) Insert

## InsertOneNewTrackSpec

[Line 409](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L409), local.

- [437](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L437) validates [Table 336 Tracking Specification](https://jonas-paprotka.de/ref/table/336-tracking-specification/) `Quantity (Base)`
- [438](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L438) writes [Table 336 Tracking Specification](https://jonas-paprotka.de/ref/table/336-tracking-specification/) Insert

## InsertCorrectiveShipmentLine

[Line 459](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L459), local.

- [464](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L464) raises `OnBeforeInsertCorrectiveShipmentLine`
- [466](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L466) calls `GetCorrectiveShptLineNoStep`
- [481](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L481) raises `OnInsertCorrectiveShipmentLineOnBeforeInsert`
- [482](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L482) writes [Table 5991 Service Shipment Line](https://jonas-paprotka.de/ref/table/5991-service-shipment-line/) Insert
- [484](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L484) calls `UpdateItemJnlLine`
- [486](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L486) calls `InsertNewTrackSpecifications`
- [487](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L487) calls `InsertItemEntryRelation`

## UpdateOrderLine

[Line 491](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L491), local.

- [496](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L496) calls [Codeunit 6484 Serv. Undo Posting Mgt.](https://jonas-paprotka.de/ref/codeunit/6484-serv-undo-posting-mgt/) `UpdateServLineCnsm`
- [497](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L497) raises `OnAfterUpdateOrderLine`

## UpdateServShptLine

[Line 500](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L500), local.

- [507](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L507) writes [Table 5991 Service Shipment Line](https://jonas-paprotka.de/ref/table/5991-service-shipment-line/) Modify

## InsertItemEntryRelation

[Line 510](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L510), local.

- [517](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L517) calls [Table 5991 Service Shipment Line](https://jonas-paprotka.de/ref/table/5991-service-shipment-line/) `TransferToItemEntryRelation`
- [518](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L518) writes [Table 6507 Item Entry Relation](https://jonas-paprotka.de/ref/table/6507-item-entry-relation/) Insert
- [520](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L520) writes [Table 6507 Item Entry Relation](https://jonas-paprotka.de/ref/table/6507-item-entry-relation/) DeleteAll

## UpdateItemJnlLine

[Line 523](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L523), local.

- [529](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L529) writes [Table 32 Item Ledger Entry](https://jonas-paprotka.de/ref/table/32-item-ledger-entry/) Modify

## MakeInventoryAdjustment

[Line 533](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L533), local.

- [539](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L539) calls [Table 313 Inventory Setup](https://jonas-paprotka.de/ref/table/313-inventory-setup/) `AutomaticCostAdjmtRequired`
- [540](https://jonas-paprotka.de/ref/codeunit/5819-undo-service-consumption-line/source/#L540) calls [Codeunit 5894 Inventory Adjustment Handler](https://jonas-paprotka.de/ref/codeunit/5894-inventory-adjustment-handler/) `MakeInventoryAdjustment`

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
