---
id: object/codeunit/5818
type: object
title: Codeunit 5818 "Undo Service Shipment Line"
summary: Codeunit 5818 "Undo Service Shipment Line" in Base Application (Microsoft.Service.History). 2 public procedures, 17 events. Present since at least BC23, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: null
  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: 25cc2b94ea9a1f249989f1cb047c272c17aa5ae0b3560f658157ba36411cace2
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Service/History/UndoServiceShipmentLine.Codeunit.al
    title: src/Layers/W1/BaseApp/Service/History/UndoServiceShipmentLine.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: 5818
name: Undo Service Shipment 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: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 30
  events: 17
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 2
  calls: 9
  called_by: 1
  implements: 0
---

# Codeunit 5818 "Undo Service Shipment Line"

> Codeunit 5818 "Undo Service Shipment Line" in Base Application (Microsoft.Service.History). 2 public procedures, 17 events. Present since at least BC23, still in BC30.

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

## Properties

| Property | Value |
|---|---|
| TableNo | Service Shipment Line |
| Permissions | TableData "Item Application Entry" = rmd, TableData "Service Line" = rimd, TableData "Service Ledger Entry" = ri, 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) OnAfterCopyItemJnlLineFromServShptForUndoServiceShipment
- `OnAfterInsertNewShipmentLine(var ServiceShipmentLine: Record "Service Shipment Line"; PostedWhseShptLine: Record "Posted Whse. Shipment Line"; var PostedWhseShptLineFound: Boolean)` (integration)
- `OnAfterGetCorrectionLineNo(ServiceShipmentLine: Record "Service Shipment Line"; var Result: Integer)` (integration)
- `OnAfterUpdateOrderLine(var ServiceLine: Record "Service Line"; var ServiceShptLine: Record "Service Shipment Line")` (integration)
- `OnBeforeCheckServShptLine(var ServiceShptLine: Record "Service Shipment Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeGetCorrectionLineNo(ServiceShipmentLine: Record "Service Shipment Line"; var Result: Integer; var IsHandled: Boolean)` (integration)
- `OnBeforeInsertNewShipmentLine(var ServiceShptLine: Record "Service Shipment Line"; ItemShptEntryNo: Integer; var TempGlobalItemEntryRelation: Record "Item Entry Relation" temporary; var IsHandled: Boolean)` (integration)
- `OnBeforeNewServiceShptLineInsert(var NewServiceShipmentLine: Record "Service Shipment Line"; OldServiceShipmentLine: Record "Service Shipment Line")` (integration)
  - subscribers: [Codeunit 6285 "Sust. Service Subscriber"](../codeunit/6285.md) OnBeforeNewServiceShptLineInsertForUndoServiceShipment
- `OnBeforePostResJnlLine(var ResJournalLine: Record "Res. Journal Line"; var ServiceShptLine: Record "Service Shipment Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeOnRun(var ServiceShipmentLine: Record "Service Shipment Line"; var IsHandled: Boolean)` (integration)
- `OnCodeOnAfterServShptLineModify(var ServShptLine: Record "Service Shipment Line"; var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary)` (integration)
- `OnCodeOnBeforeServShptLineModify(var ServShptLine: Record "Service Shipment Line"; var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary)` (integration)
- `OnCheckComponentsAdjustedOnAfterLocalServShptLineSetFilters(var ServiceShptLine: Record "Service Shipment Line")` (integration)
- `OnAfterPostItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var ServiceShipmentLine: Record "Service Shipment Line")` (integration)
- `OnItemJnlPostLineOnAfterItemShptEntryNoOnBeforeExit(var ItemJournalLine: Record "Item Journal Line"; var ServiceShipmentLine: Record "Service Shipment Line")` (integration)
- `OnPostResJnlLineOnAfterRunWithCheck(var ResJournalLine: Record "Res. Journal Line"; var ServiceShipmentLine: Record "Service Shipment Line")` (integration)

## Procedures

- `SetHideDialog(NewHideDialog: Boolean)`
- `GetCorrectionLineNo(ServiceShipmentLine2: Record "Service Shipment Line"): Integer`

Plus 11 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 7320 "Whse. Undo Quantity"](../codeunit/7320.md) (5 calls: `Code → FindPostedWhseShptLine`, `Code → PostTempWhseJnlLine`, `Code → UndoPostedWhseShptLine`, …)
- [Codeunit 5817 "Undo Posting Management"](../codeunit/5817.md) (4 calls: `CheckServShptLine → CheckItemLedgEntries`, `CheckServShptLine → CollectItemLedgEntries`, `PostItemJnlLine → CollectItemLedgEntries`, …)
- [Codeunit 5912 "ServLedgEntries-Post"](../codeunit/5912.md) (4 calls: `Code → FinishServiceRegister`, `Code → InitServiceRegister`, `Code → ReverseServLedgEntry`, …)
- [Codeunit 27 "Confirm Management"](../codeunit/27.md) (2 calls: `Code → GetResponseOrDefault`, `OnRun → GetResponseOrDefault`)
- [Codeunit 5894 "Inventory Adjustment Handler"](../codeunit/5894.md) (2 calls: `MakeInventoryAdjustment → MakeInventoryAdjustment`, `MakeInventoryAdjustment → SetJobUpdateProperties`)
- [Codeunit 6484 "Serv. Undo Posting Mgt."](../codeunit/6484.md) (2 calls: `CheckServShptLine → TestServShptLine`, `UpdateOrderLine → UpdateServLine`)
- [Codeunit 212 "Res. Jnl.-Post Line"](../codeunit/212.md) (1 call: `PostResJnlLine → RunWithCheck`)
- [Codeunit 22 "Item Jnl.-Post Line"](../codeunit/22.md) (1 call: `PostItemJnlLine → (object)`)
- [Codeunit 6451 "Serv. Time Sheet Mgt."](../codeunit/6451.md) (1 call: `PostResJnlLine → CreateTSLineFromServiceShptLine`)

## Called by

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

## Across versions

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

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