---
id: object/codeunit/99000832
type: object
title: Codeunit 99000832 "Sales Line-Reserve"
summary: Codeunit 99000832 "Sales Line-Reserve" in Base Application (Microsoft.Sales.Document). 37 public procedures, 41 events, 29 event subscribers. Present since at least BC23, still in BC30, changed in BC24-28.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "28"
  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: a2f9c4459d08bef254efe41cd9f2002a9f94ebd26c36fce3286d1ae372143cf6
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Sales/Document/SalesLineReserve.Codeunit.al
    title: src/Layers/W1/BaseApp/Sales/Document/SalesLineReserve.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/10875
object_type: codeunit
object_id: 99000832
name: Sales Line-Reserve
namespace: Microsoft.Sales.Document
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 127
  events: 41
  subscribers: 29
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 12
  called_by: 26
  implements: 0
---

# Codeunit 99000832 "Sales Line-Reserve"

> Codeunit 99000832 "Sales Line-Reserve" in Base Application (Microsoft.Sales.Document). 37 public procedures, 41 events, 29 event subscribers. Present since at least BC23, still in BC30, changed in BC24-28.

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

## Properties

| Property | Value |
|---|---|
| Permissions | TableData "Reservation Entry" = rimd, TableData "Planning Assignment" = rimd |

## Events published

- `OnAfterTestSourceTableFields(SalesLine: Record "Sales Line")` (integration): Raised after testing source table fields for the sales line during reservation validation.
- `OnAfterReservQuantity(SalesLine: Record "Sales Line"; var QtyToReserve: Decimal; var QtyToReserveBase: Decimal)` (integration): Raised after calculating the quantity to reserve for a sales line.
- `OnBeforeAssignForPlanning(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)` (integration): Raised before assigning a sales line for planning purposes.
- `OnBeforeDeleteSalesReservEntries(var NewSalesLine: Record "Sales Line"; var OldSalesLine: Record "Sales Line"; var ReservMgt: Codeunit "Reservation Management"; var IsHandled: Boolean)` (integration): Raised before deleting sales reservation entries when a sales line is modified.
- `OnBeforeRetrieveInvoiceSpecification(var SalesLine: Record "Sales Line"; var OK: Boolean; var IsHandled: Boolean; var TempInvoicingSpecification: Record "Tracking Specification" temporary)` (integration): Raised before retrieving the invoice specification for item tracking on a sales line.
- `OnBeforeRetrieveInvoiceSpecification2(var SalesLine: Record "Sales Line"; var OK: Boolean; var IsHandled: Boolean)` (integration): Raised before retrieving the invoice specification (variant 2) for item tracking on a sales line.
- `OnBeforeTransferSaleLineToSalesLine(var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line"; var TransferQty: Decimal; var IsHandled: Boolean)` (integration): Raised before transferring reservation entries from one sales line to another.
- `OnBeforeVerifyChange(var NewSalesLine: Record "Sales Line"; var OldSalesLine: Record "Sales Line"; var IsHandled: Boolean)` (integration): Raised before verifying changes to a sales line that may affect reservations.
- `OnCreateReservationOnBeforeTestVariantCode(SalesLine: Record "Sales Line"; FromTrackingSpecification: Record "Tracking Specification"; var IsHandled: Boolean)` (integration): Raised before testing the variant code during reservation creation.
- `OnCreateReservationOnBeforeTestLocationCode(SalesLine: Record "Sales Line"; FromTrackingSpecification: Record "Tracking Specification"; var IsHandled: Boolean)` (integration): Raised before testing the location code during reservation creation.
- `OnTestSalesLineModificationOnBeforeTestBinCode(var NewSalesLine: Record "Sales Line"; var OldSalesLine: Record "Sales Line"; var IsHandled: Boolean)` (integration): Raised before testing the bin code when verifying sales line modifications.
- `OnTestSalesLineModificationOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var IsHandled: Boolean)` (integration): Raised before testing the job number when verifying sales line modifications.
- `OnTestSalesLineModificationOnBeforeTestVariantCode(var NewSalesLine: Record "Sales Line"; var OldSalesLine: Record "Sales Line"; var IsHandled: Boolean; var HasError: Boolean; ThrowError: Boolean)` (integration): Raised before testing the variant code when verifying sales line modifications.
- `OnTestSalesLineModificationOnBeforeTestLocationCode(var NewSalesLine: Record "Sales Line"; var OldSalesLine: Record "Sales Line"; var IsHandled: Boolean; var HasError: Boolean)` (integration): Raised before testing the location code when verifying sales line modifications.
- `OnTransferSalesLineToItemJnlLineOnBeforeItemJournalLineTest(SalesLine: Record "Sales Line"; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line"; var TransferQty: Decimal)` (integration): Raised before testing the item journal line during transfer from sales line.
- `OnTransferSalesLineToItemJnlLineOnBeforeInitRecordSet(var OldReservationEntry: Record "Reservation Entry")` (integration): Raised before initializing the record set during transfer of sales line to item journal line.
- `OnTransferSalesLineToItemJnlLineOnBeforeOldReservEntryTest(SalesLine: Record "Sales Line"; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line")` (integration): Raised before testing the old reservation entry during transfer from sales line to item journal line.
- `OnTransferSalesLineToItemJnlLineOnBeforeTransferReservationEntry(var ReservationEntry: Record "Reservation Entry"; SalesLine: Record "Sales Line"; ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)` (integration): Raised before transferring the reservation entry from sales line to item journal line.
- `OnTransferSaleLineToSalesLineOnBeforeCalcTransferQty(var NewSalesLine: Record "Sales Line"; var OldReservationEntry: Record "Reservation Entry"; var IsHandled: Boolean)` (integration): Raised before calculating the transfer quantity when transferring between sales lines.
- `OnVerifyChangeOnBeforeHasError(NewSalesLine: Record "Sales Line"; OldSalesLine: Record "Sales Line"; var HasError: Boolean; var ShowError: Boolean)` (integration): Raised before determining if an error occurred when verifying changes to a sales line.
- `OnTransferSalesLineToItemJnlLineOnBeforeApplFromItemEntryTestField(SalesLine: Record "Sales Line"; OldReservEntry: Record "Reservation Entry"; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line")` (integration): Raised before testing the Appl.-from Item Entry field during transfer from sales line to item journal line.
- `OnBeforeCallItemTracking(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)` (integration): Raised before calling the item tracking page for a sales line.
- `OnBeforeCreateReservation(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)` (integration): Raised before creating a reservation for a sales line.
- `OnBeforeDeleteInvoiceSpecFromHeader(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)` (integration): Raised before deleting invoice specifications from a sales header.
- `OnBeforeDeleteInvoiceSpecFromLine(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)` (integration): Raised before deleting invoice specifications from a sales line.
- `OnBeforeVerifyQuantity(var NewSalesLine: Record "Sales Line"; var IsHandled: Boolean; var OldSalesLine: Record "Sales Line")` (integration): Raised before verifying quantity changes on a sales line that may affect reservations.
- `OnBeforeTransferSalesLineToItemJnlLine(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line")` (integration): Raised before transferring a sales line to an item journal line.
- `OnCallItemTrackingOnBeforeItemTrackingLinesRunModal(var SalesLine: Record "Sales Line"; var ItemTrackingLines: Page "Item Tracking Lines")` (integration): Raised before running the Item Tracking Lines page modally for a sales line.
- `OnCallItemTrackingSecondSourceOnBeforeItemTrackingLinesRun(var SalesLine: Record "Sales Line"; var ItemTrackingLines: Page "Item Tracking Lines")` (integration): Raised before running the Item Tracking Lines page for a secondary source on a sales line.
- `OnCallItemTrackingSecondSourceOnBeforeOpenItemTrackingLines(var SalesLine: Record "Sales Line"; TrackingSpecification: Record "Tracking Specification"; SecondSourceQuantityArray: array[3] of Decimal; var IsHandled: Boolean)` (integration): Raised before opening item tracking lines for a secondary source on a sales line.
- `OnRetrieveInvoiceSpecificationOnBeforeInsert(var TempInvoicingSpecification: Record "Tracking Specification" temporary; ReservEntry: Record "Reservation Entry")` (integration): Raised before inserting a tracking specification when retrieving invoice specifications.
- `OnCreateReservationOnBeforeCheckReservedQty(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; QuantityBase: Decimal)` (integration): Raised before checking the reserved quantity during reservation creation.
- `OnCreateReservationOnBeforeCreateReservEntry(var SalesLine: Record "Sales Line"; var Quantity: Decimal; var QuantityBase: Decimal; var ForReservEntry: Record "Reservation Entry"; var IsHandled: Boolean; var FromTrackingSpecification: Record "Tracking Specification"; ExpectedReceiptDate: Date; Description: Text[100]; ShipmentDate: Date; var DoCreateReservationEntry: Boolean)` (integration): Raised before creating a reservation entry during reservation creation.
- `OnAfterCreateReservation(var SalesLine: Record "Sales Line")` (integration): Raised after creating a reservation for a sales line.
- `OnBeforeDeleteLine(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)` (integration): Raised before deleting reservation entries for a sales line.
- `OnBeforeAutoReserveSalesLine(ReservSummEntryNo: Integer; var RemainingQtyToReserve: Decimal; var RemainingQtyToReserveBase: Decimal; Description: Text[100]; AvailabilityDate: Date; var IsReserved: Boolean; Search: Text[1]; NextStep: Integer; CalcReservEntry: Record "Reservation Entry")` (integration): Raised before automatically reserving a sales line.
- `OnCreateReservationOnBeforeCreateReservation(var SalesLine: Record "Sales Line"; var TrackingSpecification: Record "Tracking Specification"; var Description: Text[100]; var ExpectedDate: Date; var Quantity: Decimal; var QuantityBase: Decimal; var ReservationEntry: Record "Reservation Entry")` (integration): Raised before creating a reservation from the reservation management event handler.
- `OnSetSourceForReservationOnBeforeUpdateReservation(var ReservEntry: Record "Reservation Entry"; SalesLine: Record "Sales Line")` (integration, obsolete 27.0)
- `OnAfterSetSourceForReservation(var CalcReservEntry: Record "Reservation Entry"; SalesLine: Record "Sales Line")` (integration, obsolete 27.0)
- `OnAfterInitFromSalesLine(var TrackingSpecification: Record "Tracking Specification"; SalesLine: Record "Sales Line")` (integration): Raised after initializing a tracking specification from a sales line.
- `OnBeforeCheckSourceTypeSubtypeOnBeforeIsError(var ReservationEntry: Record "Reservation Entry"; var IsError: Boolean; var IsHandled: Boolean)` (integration): Raised before checking the source type and subtype for error conditions in reservation entries.

## Event subscriptions

- OnGetQtyPerUOMFromSourceRecRef subscribes to Page "Reservation" OnGetQtyPerUOMFromSourceRecRef
- OnSetReservSource subscribes to Page "Reservation" OnSetReservSource
- ReservationOnDrillDownTotalQuantity subscribes to Page "Reservation" OnDrillDownTotalQuantity
- OnFilterReservEntry subscribes to Page "Reservation" OnFilterReservEntry
- OnRelatesToEntrySummary subscribes to Page "Reservation" OnAfterRelatesToSummEntry
- ItemLedgerEntryOnDrillDownTotalQuantity subscribes to Codeunit "Item Ledger Entry-Reserve" OnDrillDownTotalQuantity
- OnCreateReservation subscribes to Codeunit "Reservation Management" OnCreateReservation
- OnLookupDocument subscribes to Codeunit "Reservation Management" OnLookupDocument
- OnLookupLine subscribes to Codeunit "Reservation Management" OnLookupLine
- OnFilterReservFor subscribes to Codeunit "Reservation Management" OnFilterReservFor
- OnCalculateRemainingQty subscribes to Codeunit "Reservation Management" OnCalculateRemainingQty
- OnGetSourceRecordValue subscribes to Codeunit "Reservation Management" OnGetSourceRecordValue
- OnLookupReserved subscribes to Page "Reservation Entries" OnLookupReserved
- OnUpdateStatistics subscribes to Codeunit "Reservation Management" OnUpdateStatistics
- OnAfterAutoReserveOneLine subscribes to Codeunit "Reservation Management" OnAfterAutoReserveOneLine
- OnAutoTrackOnCheckSourceType subscribes to Codeunit "Reservation Management" OnAutoTrackOnCheckSourceType
- OnTestItemType subscribes to Codeunit "Reservation Management" OnTestItemType
- OnAutoReserveOnBeforeStopReservation subscribes to Codeunit "Reservation Management" OnAutoReserveOnBeforeStopReservation
- CheckSourceTypeSubtype subscribes to Codeunit "Create Reserv. Entry" OnCheckSourceTypeSubtype
- OnRevertDateToSourceDate subscribes to Codeunit "Reservation Engine Mgt." OnRevertDateToSourceDate
- OnGetActivePointerFieldsOnBeforeAssignArrayValues subscribes to Codeunit "Reservation Engine Mgt." OnGetActivePointerFieldsOnBeforeAssignArrayValues
- OnAfterCreateText subscribes to Codeunit "Reservation Engine Mgt." OnCreateText
- OnBeforeCheckApplyFromItemEntrySourceType subscribes to Table "Tracking Specification" OnBeforeCheckApplyFromItemEntrySourceType
- OnBeforeSummEntryNo subscribes to Table "Reservation Entry" OnAfterSummEntryNo
- ReservationEntryOnUpdateSourceCost subscribes to Table "Reservation Entry" OnUpdateSourceCost
- OnReserveBindingOrder subscribes to Table "Requisition Line" OnReserveBindingOrder
- OrderTrackingManagementOnSetSourceRecord subscribes to Codeunit "OrderTrackingManagement" OnSetSourceRecord
- OnInsertOrderTrackingEntry subscribes to Codeunit "OrderTrackingManagement" OnInsertOrderTrackingEntry
- OnGetSourceShipmentDate subscribes to Table "Tracking Specification" OnGetSourceShipmentDate

## Procedures

- `CreateReservation(SalesLine: Record "Sales Line"; Description: Text[100]; ExpectedReceiptDate: Date; Quantity: Decimal; QuantityBase: Decimal; ForReservationEntry: Record "Reservation Entry")`: Creates a reservation entry for a sales line with the specified tracking and quantity details.
- `CreateBindingReservation(SalesLine: Record "Sales Line"; Description: Text[100]; ExpectedReceiptDate: Date; Quantity: Decimal; QuantityBase: Decimal)`: Creates a binding reservation for a sales line without linking to an existing reservation entry.
- `CreateReservationSetFrom(TrackingSpecification: Record "Tracking Specification")`: Sets the tracking specification to use when creating reservation entries.
- `SetBinding(Binding: Enum "Reservation Binding")`: Sets the binding type for reservation entries to be created.
- `SetDisallowCancellation(DisallowCancellation: Boolean)`: Sets whether cancellation of reservation entries is disallowed.
- `ReservQuantity(SalesLine: Record "Sales Line"; var QtyToReserve: Decimal; var QtyToReserveBase: Decimal)`: Calculates the quantity available for reservation on a sales line.
- `Caption(SalesLine: Record "Sales Line"): Text`: Returns a caption describing the sales line for reservation purposes.
- `FindReservEntry(SalesLine: Record "Sales Line"; var ReservationEntry: Record "Reservation Entry"): Boolean`: Finds the last reservation entry for the specified sales line.
- `GetReservedQtyFromInventory(SalesLine: Record "Sales Line"): Decimal`: Calculates the quantity reserved from inventory for a sales line.
- `GetReservedQtyFromInventory(SalesHeader: Record "Sales Header"): Decimal`: Calculates the total quantity reserved from inventory for all lines on a sales header.
- `ReservEntryExist(SalesLine: Record "Sales Line"): Boolean`: Checks whether a reservation entry exists for the specified sales line.
- `VerifyChange(var NewSalesLine: Record "Sales Line"; var OldSalesLine: Record "Sales Line")`: Verifies and handles changes to a sales line that affect reservations.
- `VerifyQuantity(var NewSalesLine: Record "Sales Line"; var OldSalesLine: Record "Sales Line")`: Verifies and handles quantity changes on a sales line that affect reservations.
- `SetSaleShipQty(ErrorInfo: ErrorInfo)`: Sets the quantity to ship on a sales line to the outstanding quantity. Called as an action from error handling.
- `SetSalesQtyInvoice(ErrorInfo: ErrorInfo)`: Sets the quantity to invoice on a sales line to the maximum quantity. Called as an action from error handling.
- `TransferSalesLineToItemJnlLine(var SalesLine: Record "Sales Line"; var ItemJournalLine: Record "Item Journal Line"; TransferQty: Decimal; var CheckApplFromItemEntry: Boolean; OnlyILEReservations: Boolean): Decimal`: Transfers reservation entries from a sales line to an item journal line during posting.
- `TransferSaleLineToSalesLine(var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line"; TransferQty: Decimal)`: Transfers reservation entries from one sales line to another. Used when converting quotes or blanket orders to orders.
- `DeleteLineConfirm(var SalesLine: Record "Sales Line"): Boolean`: Prompts the user to confirm deletion of item tracking when deleting a sales line with reservations.
- `DeleteLine(var SalesLine: Record "Sales Line")`: Deletes all reservation entries associated with a sales line.
- `AssignForPlanning(var SalesLine: Record "Sales Line")`: Creates or updates a planning assignment for a sales order line.
- `CallItemTracking(var SalesLine: Record "Sales Line")`: Opens the Item Tracking Lines page for a sales line.
- `CallItemTracking(var SalesLine: Record "Sales Line"; SecondSourceQuantityArray: array[3] of Decimal)`: Opens the Item Tracking Lines page for a sales line with a second source quantity array.
- `CallItemTrackingSecondSource(var SalesLine: Record "Sales Line"; SecondSourceQuantityArray: array[3] of Decimal; AsmToOrder: Boolean)`: Opens the Item Tracking Lines page for a sales line with a second source and assembly-to-order option.
- `RetrieveInvoiceSpecification(var SalesLine: Record "Sales Line"; var TempInvoicingTrackingSpecification: Record "Tracking Specification" temporary): Boolean`: Retrieves the invoice specification tracking data for a sales line.
- `RetrieveInvoiceSpecification2(var SalesLine: Record "Sales Line"; var TempInvoicingTrackingSpecification: Record "Tracking Specification" temporary): Boolean`: Retrieves invoice specification for combined shipment or return scenarios.
- `DeleteInvoiceSpecFromHeader(var SalesHeader: Record "Sales Header")`: Deletes invoice specifications for all lines in a sales header.
- `UpdateItemTrackingAfterPosting(SalesHeader: Record "Sales Header")`: Updates item tracking quantities after posting a sales document.
- `SetApplySpecificItemTracking(ApplySpecific: Boolean)`: Sets whether to apply specific item tracking when reserving.
- `SetOverruleItemTracking(Overrule: Boolean)`: Sets whether to overrule existing item tracking during reservation.
- `Block(SetBlocked: Boolean)`: Sets the blocked state for reservation operations.
- `SetItemTrkgAlreadyOverruled(HasBeenOverruled: Boolean)`: Sets whether item tracking has already been overruled.
- `BindToTracking(SalesLine: Record "Sales Line"; TrackingSpecification: Record "Tracking Specification"; Description: Text[100]; ExpectedDate: Date; ReservQty: Decimal; ReservQtyBase: Decimal)`: Binds a sales line to item tracking with order-to-order binding.
- `DeleteLineWithItemTracking(var SalesLine: Record "Sales Line")`: Deletes a sales line along with its item tracking entries.
- `SetDeleteItemTracking(NewDeleteItemTracking: Boolean)`: Sets whether to delete item tracking when deleting lines.
- `CopyReservEntryToTemp(var TempReservationEntry: Record "Reservation Entry" temporary; OldSalesLine: Record "Sales Line")`: Copies reservation entries from a sales line to a temporary table.
- `CopyReservEntryFromTemp(var TempReservationEntry: Record "Reservation Entry" temporary; OldSalesLine: Record "Sales Line"; NewSourceRefNo: Integer)`: Copies reservation entries from a temporary table back to the database with a new source reference.
- `InitFromSalesLine(var TransactionSpecification: Record "Tracking Specification"; SalesLine: Record "Sales Line")`: Initializes a tracking specification from a sales line for item tracking purposes.

Plus 20 local procedures.

## Triggers

OnRun

## 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 99000845 "Reservation Management"](../codeunit/99000845.md) (17 calls: `AutoReserveSalesLine → GetAvailabilityFilter`, `AutoReserveSalesLine → InsertReservationEntries`, `AutoReserveSalesLine → SetQtyToReserveDownToTrackedQuantity`, …)
- [Codeunit 99000830 "Create Reserv. Entry"](../codeunit/99000830.md) (13 calls: `CreateReservation → CreateReservEntry`, `CreateReservation → CreateReservEntryFor`, `CreateReservation → CreateReservEntryFrom`, …)
- [Codeunit 6500 "Item Tracking Management"](../codeunit/6500.md) (4 calls: `CallItemTracking → ComposeRowID`, `DeleteInvoiceSpecFromHeader → DeleteInvoiceSpecFromHeader`, `DeleteInvoiceSpecFromLine → DeleteInvoiceSpecFromLine`, …)
- [Codeunit 99000831 "Reservation Engine Mgt."](../codeunit/99000831.md) (2 calls: `TransferSalesLineToItemJnlLine → InitRecordSet`, `TransferSalesLineToItemJnlLine → NEXTRecord`)
- [Page 516 "Sales Lines"](../page/516.md) (2 calls: `OnLookupLine → (object)`, `ShowSourceLines → (object)`)
- [Codeunit 5402 "Unit of Measure Management"](../codeunit/5402.md) (1 call: `RetrieveInvoiceSpecification2 → QtyRndPrecision`)
- [Codeunit 99000841 "Item Ledger Entry-Reserve"](../codeunit/99000841.md) (1 call: `ItemLedgerEntryOnDrillDownTotalQuantity → DrillDownTotalQuantity`)
- [Page 41 "Sales Quote"](../page/41.md) (1 call: `OnLookupDocument → (object)`)
- [Page 42 "Sales Order"](../page/42.md) (1 call: `OnLookupDocument → (object)`)
- [Page 43 "Sales Invoice"](../page/43.md) (1 call: `OnLookupDocument → (object)`)
- [Page 44 "Sales Credit Memo"](../page/44.md) (1 call: `OnLookupDocument → (object)`)
- [Page 6630 "Sales Return Order"](../page/6630.md) (1 call: `OnLookupDocument → (object)`)

## Called by

- [Codeunit 80 "Sales-Post"](../codeunit/80.md) (9 calls: `DeleteAfterPosting → DeleteInvoiceSpecFromHeader`, `InsertTrackingSpecification → UpdateItemTrackingAfterPosting`, `PostItemJnlLineBeforePost → TransferSalesLineToItemJnlLine`, …)
- [Table 37 "Sales Line"](../table/37.md) (6 calls: `BlockDynamicTracking → Block`, `CheckIfSalesLineMeetsReservedFromStockSetting → GetReservedQtyFromInventory`, `OnDelete → DeleteLine`, …)
- [Codeunit 90 "Purch.-Post"](../codeunit/90.md) (4 calls: `TransferReservToItemJnlLine → SetApplySpecificItemTracking`, `TransferReservToItemJnlLine → SetOverruleItemTracking`, `TransferReservToItemJnlLine → TransferSalesLineToItemJnlLine`, …)
- [Codeunit 99000872 "Sales Availability Mgt."](../codeunit/99000872.md) (4 calls: `OnCreateReservationsOnBindToTracking → BindToTracking`, `OnUpdateSourceLine → ReservQuantity`, `TransferFromSales → ReservQuantity`, …)
- [Table 36 "Sales Header"](../table/36.md) (4 calls: `GetQtyReservedFromStockState → GetReservedQtyFromInventory`, `RecreateReservEntryReqLine → CopyReservEntryToTemp`, `RecreateSalesLines → CopyReservEntryFromTemp`, …)
- [Codeunit 1305 "Sales-Quote to Invoice"](../codeunit/1305.md) (2 calls: `CreateSalesInvoiceLines → TransferSaleLineToSalesLine`, `CreateSalesInvoiceLines → VerifyQuantity`)
- [Codeunit 86 "Sales-Quote to Order"](../codeunit/86.md) (2 calls: `TransferQuoteToOrderLines → TransferSaleLineToSalesLine`, `TransferQuoteToOrderLines → VerifyQuantity`)
- [Page 46 "Sales Order Subform"](../page/46.md) (2 calls: `OnDeleteRecord → DeleteLine`, `OnDeleteRecord → DeleteLineConfirm`)
- [Page 47 "Sales Invoice Subform"](../page/47.md) (2 calls: `OnDeleteRecord → DeleteLine`, `OnDeleteRecord → DeleteLineConfirm`)
- [Page 6631 "Sales Return Order Subform"](../page/6631.md) (2 calls: `OnDeleteRecord → DeleteLine`, `OnDeleteRecord → DeleteLineConfirm`)
- [Page 95 "Sales Quote Subform"](../page/95.md) (2 calls: `OnDeleteRecord → DeleteLine`, `OnDeleteRecord → DeleteLineConfirm`)
- [Page 96 "Sales Cr. Memo Subform"](../page/96.md) (2 calls: `OnDeleteRecord → DeleteLine`, `OnDeleteRecord → DeleteLineConfirm`)
- [Codeunit 20438 "Qlty. Warehouse Integration"](../codeunit/20438.md) (1 call: `CollectSourceItemTracking → FindReservEntry`)
- [Codeunit 333 "Req. Wksh.-Make Order"](../codeunit/333.md) (1 call: `ReserveBindingOrderToPurch → BindToTracking`)
- [Codeunit 5701 "Item Subst."](../codeunit/5701.md) (1 call: `ItemSubstGet → DeleteLine`)
- [Codeunit 5817 "Undo Posting Management"](../codeunit/5817.md) (1 call: `SalesLineReserveVerifyQuantity → VerifyQuantity`)
- [Codeunit 7171 "Sales Info-Pane Management"](../codeunit/7171.md) (1 call: `GetQtyReservedFromStockState → GetReservedQtyFromInventory`)
- [Codeunit 87 "Blanket Sales Order to Order"](../codeunit/87.md) (1 call: `CreateSalesOrderLines → TransferSaleLineToSalesLine`)
- [Codeunit 900 "Assembly-Post"](../codeunit/900.md) (1 call: `RestoreItemTracking → InitFromSalesLine`)
- [Codeunit 99000787 "Create Prod. Order Lines"](../codeunit/99000787.md) (1 call: `CopyFromSalesOrder → BindToTracking`)
- [Codeunit 99000792 "Create Prod. Order from Sale"](../codeunit/99000792.md) (1 call: `CreateProductionOrder → BindToTracking`)
- [Codeunit 99000815 "Reservation-Check Date Confl."](../codeunit/99000815.md) (1 call: `SalesLineCheck → FindReservEntry`)
- [Codeunit 99000839 "Sales Get Demand To Reserve"](../codeunit/99000839.md) (1 call: `OnGetSourceDocumentLineQuantities → GetReservedQtyFromInventory`)
- [Table 7317 "Warehouse Receipt Line"](../table/7317.md) (1 call: `OpenItemTrackingLines → CallItemTracking`)
- [Table 7321 "Warehouse Shipment Line"](../table/7321.md) (1 call: `OpenItemTrackingLines → CallItemTrackingSecondSource`)
- [Table 904 "Assemble-to-Order Link"](../table/904.md) (1 call: `RestoreItemTracking → InitFromSalesLine`)

## Recent changes

- 2026-09-15 [#10875 [Master] Partial Warehouse Shipment with Lot-Tracked Item Fails on Second Shipment Due to Auto-Populated Bin Code and Item Tracking Quantity Validation Error ("You cannot select more than 0 units")Initial commit](../../changes/bcapps/10875.md) (main, BC30, fix)

## Across versions

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

## Deprecations

- procedure OnAfterSetSourceForReservation: Pending 27.0 (#if not CLEAN27), "This event is never raised."
- procedure OnSetSourceForReservationOnBeforeUpdateReservation: Pending 27.0 (#if not CLEAN27), "This event is never raised."

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