---
id: object/codeunit/5819
type: object
title: Codeunit 5819 "Undo Service Consumption Line"
summary: Codeunit 5819 "Undo Service Consumption Line" in Base Application (Microsoft.Service.History). 1 public procedures, 14 events. Present since at least BC23, still in BC30, changed in BC24.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "24"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 6f46f1211651d7a3bb8fa65ef414b51bdcf6091a025ea03b728f165018ff36e2
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Service/History/UndoServiceConsumptionLine.Codeunit.al
    title: src/Layers/W1/BaseApp/Service/History/UndoServiceConsumptionLine.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 5819
name: Undo Service Consumption Line
namespace: Microsoft.Service.History
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 31
  events: 14
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 3
  calls: 11
  called_by: 1
  implements: 0
---

# Codeunit 5819 "Undo Service Consumption Line"

> Codeunit 5819 "Undo Service Consumption Line" in Base Application (Microsoft.Service.History). 1 public procedures, 14 events. Present since at least BC23, still in BC30, changed in BC24.

Base Application · Microsoft.Service.History · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Service/History/UndoServiceConsumptionLine.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| TableNo | Service Shipment Line |
| Permissions | TableData "Item Ledger Entry" = rm, TableData "Item Application Entry" = rmd, TableData "Service Line" = rimd, TableData "Service Ledger Entry" = rimd, TableData "Warranty Ledger Entry" = rim, TableData "Service Shipment Line" = rimd, TableData "Item Entry Relation" = ri |

## Events published

- `OnAfterCode(var ServiceShipmentLine: Record "Service Shipment Line")` (integration)
- `OnAfterCopyItemJnlLineFromServShpt(var ItemJournalLine: Record "Item Journal Line"; ServiceShipmentHeader: Record "Service Shipment Header"; ServiceShipmentLine: Record "Service Shipment Line")` (integration)
  - subscribers: [Codeunit 6285 "Sust. Service Subscriber"](../codeunit/6285.md) OnAfterCopyItemJnlLineFromServShptForUndoServiceConsumption
- `OnAfterUpdateOrderLine(var ServiceLine: Record "Service Line"; var ServiceShipmentLine: Record "Service Shipment Line")` (integration)
- `OnBeforeCheckServShptLine(var ServiceShipmentLine: Record "Service Shipment Line"; var IsHandled: Boolean)` (integration)
- `OnBeforePostItemJnlLineWithIT(var ItemJournalLine: Record "Item Journal Line"; var ServiceShipmentLine: Record "Service Shipment Line")` (integration)
- `OnBeforeReservEntryInsert(var ReservationEntry: Record "Reservation Entry"; var ItemLedgerEntry: Record "Item Ledger Entry")` (integration)
- `OnBeforeTempGlobalItemEntryRelationInsert(var ItemEntryRelation: Record "Item Entry Relation"; var ItemLedgerEntry: Record "Item Ledger Entry")` (integration)
- `OnBeforeOnRun(var ServiceShipmentLine: Record "Service Shipment Line"; var IsHandled: Boolean)` (integration)
- `OnCodeOnAfterUpdateServShptLine(var ServiceShipmentLine: Record "Service Shipment Line")` (integration)
- `OnBeforeInsertCorrectiveShipmentLine(var OldServiceShipmentLine: Record "Service Shipment Line")` (integration)
- `OnBeforePostResourceJnlLine(var ServiceShipmentLine: Record "Service Shipment Line"; var IsHandled: Boolean)` (integration)
- `OnItemJnlPostLineOnAfteItemJnlPostLineOnBeforeExit(var ItemJournalLine: Record "Item Journal Line"; var ServiceShipmentLine: Record "Service Shipment Line")` (integration)
- `OnPostResourceJnlLineOnBeforeResJnlPostLine(var ResJournalLine: Record "Res. Journal Line"; var ServiceShipmentHeader: Record "Service Shipment Header"; var ServiceShipmentLine: Record "Service Shipment Line")` (integration)
  - subscribers: [Codeunit 6285 "Sust. Service Subscriber"](../codeunit/6285.md) OnPostResourceJnlLineOnBeforeResJnlPostLine
- `OnInsertCorrectiveShipmentLineOnBeforeInsert(var NewServiceShipmentLine: Record "Service Shipment Line"; OldServiceShipmentLine: Record "Service Shipment Line")` (integration)
  - subscribers: [Codeunit 6285 "Sust. Service Subscriber"](../codeunit/6285.md) OnInsertCorrectiveShipmentLineOnBeforeInsertForUndoServiceConsumption

## Procedures

- `SetHideDialog(NewHideDialog: Boolean)`

Plus 16 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 5991 "Service Shipment Line"](../table/5991.md)

## 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"](../codeunit/5817.md) (4 calls: `CheckServShptLine → CheckItemLedgEntries`, `CheckServShptLine → CollectItemLedgEntries`, `PostItemJnlLineWithIT → CollectItemLedgEntries`, …)
- [Codeunit 5912 "ServLedgEntries-Post"](../codeunit/5912.md) (4 calls: `Code → FinishServiceRegister`, `Code → InitServiceRegister`, `Code → ReverseCnsmServLedgEntries`, …)
- [Codeunit 22 "Item Jnl.-Post Line"](../codeunit/22.md) (2 calls: `PostItemJnlLine → RunWithCheck`, `PostItemJnlLine → SetServUndoConsumption`)
- [Codeunit 6484 "Serv. Undo Posting Mgt."](../codeunit/6484.md) (2 calls: `CheckServShptLine → TestServShptLine`, `UpdateOrderLine → UpdateServLineCnsm`)
- [Codeunit 6503 "Item Tracking Doc. Management"](../codeunit/6503.md) (2 calls: `CollectItemLedgerEntries → CopyItemLedgerEntriesToTemp`, `CollectItemLedgerEntries → RetrieveDocumentItemTracking`)
- [Codeunit 7320 "Whse. Undo Quantity"](../codeunit/7320.md) (2 calls: `Code → PostTempWhseJnlLine`, `PostItemJnlLine → InsertTempWhseJnlLine`)
- [Codeunit 212 "Res. Jnl.-Post Line"](../codeunit/212.md) (1 call: `PostResourceJnlLine → RunWithCheck`)
- [Codeunit 27 "Confirm Management"](../codeunit/27.md) (1 call: `OnRun → GetResponseOrDefault`)
- [Codeunit 5894 "Inventory Adjustment Handler"](../codeunit/5894.md) (1 call: `MakeInventoryAdjustment → MakeInventoryAdjustment`)
- [Codeunit 6500 "Item Tracking Management"](../codeunit/6500.md) (1 call: `PostItemJnlLineWithIT → AdjustQuantityRounding`)
- [Codeunit 99000831 "Reservation Engine Mgt."](../codeunit/99000831.md) (1 call: `InsertNewReservationEntries → UpdateOrderTracking`)

## Called by

- [Page 5970 "Posted Service Shipment Lines"](../page/5970.md) (1 call: `UndoServConsumption → (object)`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24

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 Service Consumption Line")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
