Codeunit "Sales Line-Reserve"
Manages item reservations for sales lines including creation, modification, and verification.
Properties
| Name | Value |
|---|---|
| Permissions | TableData "Reservation Entry" = rimd, TableData "Planning Assignment" = rimd |
Methods
CreateReservation
Creates a reservation entry for a sales line with the specified tracking and quantity details.
procedure CreateReservation(SalesLine: Record "Sales Line"; Description: Text[100]; ExpectedReceiptDate: Date; Quantity: Decimal; QuantityBase: Decimal; ForReservationEntry: Record "Reservation Entry")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the sales line to create the reservation for. |
| Description | Text[100] |
Specifies the description for the reservation entry. |
| ExpectedReceiptDate | Date |
Specifies the expected receipt date for the reservation. |
| Quantity | Decimal |
Specifies the quantity to reserve. |
| QuantityBase | Decimal |
Specifies the quantity to reserve in base unit of measure. |
| ForReservationEntry | Table Microsoft.Inventory.Tracking."Reservation Entry" |
Specifies the reservation entry to link the new reservation to. |
CreateBindingReservation
Creates a binding reservation for a sales line without linking to an existing reservation entry.
procedure CreateBindingReservation(SalesLine: Record "Sales Line"; Description: Text[100]; ExpectedReceiptDate: Date; Quantity: Decimal; QuantityBase: Decimal)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the sales line to create the reservation for. |
| Description | Text[100] |
Specifies the description for the reservation entry. |
| ExpectedReceiptDate | Date |
Specifies the expected receipt date for the reservation. |
| Quantity | Decimal |
Specifies the quantity to reserve. |
| QuantityBase | Decimal |
Specifies the quantity to reserve in base unit of measure. |
CreateReservationSetFrom
Sets the tracking specification to use when creating reservation entries.
procedure CreateReservationSetFrom(TrackingSpecification: Record "Tracking Specification")
Parameters
| Name | Type | Description |
|---|---|---|
| TrackingSpecification | Table Microsoft.Inventory.Tracking."Tracking Specification" |
Specifies the tracking specification to use as the source. |
SetBinding
Sets the binding type for reservation entries to be created.
procedure SetBinding(Binding: Enum "Reservation Binding")
Parameters
| Name | Type | Description |
|---|---|---|
| Binding | Enum Microsoft.Inventory.Tracking."Reservation Binding" |
Specifies the reservation binding type. |
SetDisallowCancellation
Sets whether cancellation of reservation entries is disallowed.
procedure SetDisallowCancellation(DisallowCancellation: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| DisallowCancellation | Boolean |
Specifies whether cancellation is disallowed. |
ReservQuantity
Calculates the quantity available for reservation on a sales line.
procedure ReservQuantity(SalesLine: Record "Sales Line"; var QtyToReserve: Decimal; var QtyToReserveBase: Decimal)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the sales line to calculate reservation quantity for. |
| QtyToReserve | Decimal |
Returns the quantity available for reservation. |
| QtyToReserveBase | Decimal |
Returns the quantity available for reservation in base unit of measure. |
Caption
Returns a caption describing the sales line for reservation purposes.
procedure Caption(SalesLine: Record "Sales Line"): Text
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the sales line to get the caption for. |
Returns
| Type | Description |
|---|---|
| Text |
The caption text for the sales line. |
FindReservEntry
Finds the last reservation entry for the specified sales line.
procedure FindReservEntry(SalesLine: Record "Sales Line"; var ReservationEntry: Record "Reservation Entry"): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the sales line to find reservation entries for. |
| ReservationEntry | Table Microsoft.Inventory.Tracking."Reservation Entry" |
Returns the found reservation entry record. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if a reservation entry was found, otherwise false. |
GetReservedQtyFromInventory
Calculates the quantity reserved from inventory for a sales line.
procedure GetReservedQtyFromInventory(SalesLine: Record "Sales Line"): Decimal
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the sales line to calculate reserved quantity for. |
Returns
| Type | Description |
|---|---|
| Decimal |
The quantity reserved from inventory in base unit of measure. |
GetReservedQtyFromInventory
Calculates the total quantity reserved from inventory for all lines on a sales header.
procedure GetReservedQtyFromInventory(SalesHeader: Record "Sales Header"): Decimal
Parameters
| Name | Type | Description |
|---|---|---|
| SalesHeader | Table Microsoft.Sales.Document."Sales Header" |
Specifies the sales header to calculate reserved quantity for. |
Returns
| Type | Description |
|---|---|
| Decimal |
The total quantity reserved from inventory in base unit of measure. |
ReservEntryExist
Checks whether a reservation entry exists for the specified sales line.
procedure ReservEntryExist(SalesLine: Record "Sales Line"): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the sales line to check. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if a reservation entry exists, otherwise false. |
VerifyChange
Verifies and handles changes to a sales line that affect reservations.
procedure VerifyChange(var NewSalesLine: Record "Sales Line"; var OldSalesLine: Record "Sales Line")
Parameters
| Name | Type | Description |
|---|---|---|
| NewSalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the new version of the sales line. |
| OldSalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the original version of the sales line. |
VerifyQuantity
Verifies and handles quantity changes on a sales line that affect reservations.
procedure VerifyQuantity(var NewSalesLine: Record "Sales Line"; var OldSalesLine: Record "Sales Line")
Parameters
| Name | Type | Description |
|---|---|---|
| NewSalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the new version of the sales line. |
| OldSalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the original version of the sales line. |
SetSaleShipQty
Sets the quantity to ship on a sales line to the outstanding quantity. Called as an action from error handling.
procedure SetSaleShipQty(ErrorInfo: ErrorInfo)
Parameters
| Name | Type | Description |
|---|---|---|
| ErrorInfo | ErrorInfo |
Specifies the error information containing the sales line record ID. |
SetSalesQtyInvoice
Sets the quantity to invoice on a sales line to the maximum quantity. Called as an action from error handling.
procedure SetSalesQtyInvoice(ErrorInfo: ErrorInfo)
Parameters
| Name | Type | Description |
|---|---|---|
| ErrorInfo | ErrorInfo |
Specifies the error information containing the sales line record ID. |
TransferSalesLineToItemJnlLine
Transfers reservation entries from a sales line to an item journal line during posting.
procedure TransferSalesLineToItemJnlLine(var SalesLine: Record "Sales Line"; var ItemJournalLine: Record "Item Journal Line"; TransferQty: Decimal; var CheckApplFromItemEntry: Boolean; OnlyILEReservations: Boolean): Decimal
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the sales line to transfer reservations from. |
| ItemJournalLine | Table Microsoft.Inventory.Journal."Item Journal Line" |
Specifies the item journal line to transfer reservations to. |
| TransferQty | Decimal |
Specifies the quantity to transfer. |
| CheckApplFromItemEntry | Boolean |
Specifies whether to check the applies-from item entry. Returns whether further checks are needed. |
| OnlyILEReservations | Boolean |
Specifies whether to transfer only item ledger entry reservations. |
Returns
| Type | Description |
|---|---|
| Decimal |
The remaining quantity that was not transferred. |
TransferSaleLineToSalesLine
Transfers reservation entries from one sales line to another. Used when converting quotes or blanket orders to orders.
procedure TransferSaleLineToSalesLine(var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line"; TransferQty: Decimal)
Parameters
| Name | Type | Description |
|---|---|---|
| OldSalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the source sales line. |
| NewSalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the destination sales line. |
| TransferQty | Decimal |
Specifies the quantity to transfer. |
DeleteLineConfirm
Prompts the user to confirm deletion of item tracking when deleting a sales line with reservations.
procedure DeleteLineConfirm(var SalesLine: Record "Sales Line"): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the sales line to check. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if deletion is confirmed or no reservations exist, otherwise false. |
DeleteLine
Deletes all reservation entries associated with a sales line.
procedure DeleteLine(var SalesLine: Record "Sales Line")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the sales line to delete reservations for. |
AssignForPlanning
Creates or updates a planning assignment for a sales order line.
procedure AssignForPlanning(var SalesLine: Record "Sales Line")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the sales line to create a planning assignment for. |
CallItemTracking
Opens the Item Tracking Lines page for a sales line.
procedure CallItemTracking(var SalesLine: Record "Sales Line")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the sales line to manage item tracking for. |
CallItemTracking
Opens the Item Tracking Lines page for a sales line with a second source quantity array.
procedure CallItemTracking(var SalesLine: Record "Sales Line"; SecondSourceQuantityArray: array[3] of Decimal)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the sales line to manage item tracking for. |
| SecondSourceQuantityArray | array[3] of Decimal |
Specifies the second source quantity array for tracking. |
CallItemTrackingSecondSource
Opens the Item Tracking Lines page for a sales line with a second source and assembly-to-order option.
procedure CallItemTrackingSecondSource(var SalesLine: Record "Sales Line"; SecondSourceQuantityArray: array[3] of Decimal; AsmToOrder: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the sales line to manage item tracking for. |
| SecondSourceQuantityArray | array[3] of Decimal |
Specifies the second source quantity array for tracking. |
| AsmToOrder | Boolean |
Specifies whether this is an assemble-to-order scenario. |
RetrieveInvoiceSpecification
Retrieves the invoice specification tracking data for a sales line.
procedure RetrieveInvoiceSpecification(var SalesLine: Record "Sales Line"; var TempInvoicingTrackingSpecification: Record "Tracking Specification" temporary): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line to retrieve specification for. |
| TempInvoicingTrackingSpecification | Table Microsoft.Inventory.Tracking."Tracking Specification" |
Returns the temporary tracking specification records. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if specifications were found. |
RetrieveInvoiceSpecification2
Retrieves invoice specification for combined shipment or return scenarios.
procedure RetrieveInvoiceSpecification2(var SalesLine: Record "Sales Line"; var TempInvoicingTrackingSpecification: Record "Tracking Specification" temporary): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line to retrieve specification for. |
| TempInvoicingTrackingSpecification | Table Microsoft.Inventory.Tracking."Tracking Specification" |
Returns the temporary tracking specification records. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if specifications were found. |
DeleteInvoiceSpecFromHeader
Deletes invoice specifications for all lines in a sales header.
procedure DeleteInvoiceSpecFromHeader(var SalesHeader: Record "Sales Header")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesHeader | Table Microsoft.Sales.Document."Sales Header" |
The sales header whose specifications to delete. |
UpdateItemTrackingAfterPosting
Updates item tracking quantities after posting a sales document.
procedure UpdateItemTrackingAfterPosting(SalesHeader: Record "Sales Header")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesHeader | Table Microsoft.Sales.Document."Sales Header" |
The sales header that was posted. |
SetApplySpecificItemTracking
Sets whether to apply specific item tracking when reserving.
procedure SetApplySpecificItemTracking(ApplySpecific: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| ApplySpecific | Boolean |
Whether to apply specific item tracking. |
SetOverruleItemTracking
Sets whether to overrule existing item tracking during reservation.
procedure SetOverruleItemTracking(Overrule: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Overrule | Boolean |
Whether to overrule item tracking. |
Block
Sets the blocked state for reservation operations.
procedure Block(SetBlocked: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SetBlocked | Boolean |
Whether to block reservation operations. |
SetItemTrkgAlreadyOverruled
Sets whether item tracking has already been overruled.
procedure SetItemTrkgAlreadyOverruled(HasBeenOverruled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| HasBeenOverruled | Boolean |
Whether item tracking has been overruled. |
BindToTracking
Binds a sales line to item tracking with order-to-order binding.
procedure BindToTracking(SalesLine: Record "Sales Line"; TrackingSpecification: Record "Tracking Specification"; Description: Text[100]; ExpectedDate: Date; ReservQty: Decimal; ReservQtyBase: Decimal)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line to bind. |
| TrackingSpecification | Table Microsoft.Inventory.Tracking."Tracking Specification" |
The tracking specification to bind to. |
| Description | Text[100] |
The reservation description. |
| ExpectedDate | Date |
The expected date for the reservation. |
| ReservQty | Decimal |
The quantity to reserve. |
| ReservQtyBase | Decimal |
The quantity to reserve in base unit of measure. |
DeleteLineWithItemTracking
Deletes a sales line along with its item tracking entries.
procedure DeleteLineWithItemTracking(var SalesLine: Record "Sales Line")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line to delete. |
SetDeleteItemTracking
Sets whether to delete item tracking when deleting lines.
procedure SetDeleteItemTracking(NewDeleteItemTracking: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| NewDeleteItemTracking | Boolean |
Whether to delete item tracking. |
CopyReservEntryToTemp
Copies reservation entries from a sales line to a temporary table.
procedure CopyReservEntryToTemp(var TempReservationEntry: Record "Reservation Entry" temporary; OldSalesLine: Record "Sales Line")
Parameters
| Name | Type | Description |
|---|---|---|
| TempReservationEntry | Table Microsoft.Inventory.Tracking."Reservation Entry" |
The temporary table to copy entries to. |
| OldSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line whose reservations to copy. |
CopyReservEntryFromTemp
Copies reservation entries from a temporary table back to the database with a new source reference.
procedure CopyReservEntryFromTemp(var TempReservationEntry: Record "Reservation Entry" temporary; OldSalesLine: Record "Sales Line"; NewSourceRefNo: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| TempReservationEntry | Table Microsoft.Inventory.Tracking."Reservation Entry" |
The temporary table containing the reservations. |
| OldSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The original sales line reference. |
| NewSourceRefNo | Integer |
The new source reference number (line number). |
InitFromSalesLine
Initializes a tracking specification from a sales line for item tracking purposes.
procedure InitFromSalesLine(var TransactionSpecification: Record "Tracking Specification"; SalesLine: Record "Sales Line")
Parameters
| Name | Type | Description |
|---|---|---|
| TransactionSpecification | Table Microsoft.Inventory.Tracking."Tracking Specification" |
Returns the initialized tracking specification. |
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line to initialize from. |
Events
OnAfterTestSourceTableFields
Raised after testing source table fields for the sales line during reservation validation.
[IntegrationEvent(False,False)]
local procedure OnAfterTestSourceTableFields(SalesLine: Record "Sales Line")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line that was validated. |
OnAfterReservQuantity
Raised after calculating the quantity to reserve for a sales line.
[IntegrationEvent(False,False)]
local procedure OnAfterReservQuantity(SalesLine: Record "Sales Line"; var QtyToReserve: Decimal; var QtyToReserveBase: Decimal)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line for which the quantity was calculated. |
| QtyToReserve | Decimal |
The quantity to reserve in the sales unit of measure. |
| QtyToReserveBase | Decimal |
The quantity to reserve in base unit of measure. |
OnBeforeAssignForPlanning
Raised before assigning a sales line for planning purposes.
[IntegrationEvent(False,False)]
local procedure OnBeforeAssignForPlanning(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line to assign for planning. |
| IsHandled | Boolean |
Set to true to skip the default assignment logic. |
OnBeforeDeleteSalesReservEntries
Raised before deleting sales reservation entries when a sales line is modified.
[IntegrationEvent(False,False)]
local procedure OnBeforeDeleteSalesReservEntries(var NewSalesLine: Record "Sales Line"; var OldSalesLine: Record "Sales Line"; var ReservMgt: Codeunit "Reservation Management"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| NewSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The modified sales line. |
| OldSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The original sales line before modification. |
| ReservMgt | Codeunit Microsoft.Inventory.Tracking."Reservation Management" |
The reservation management codeunit instance. |
| IsHandled | Boolean |
Set to true to skip the default deletion logic. |
OnBeforeRetrieveInvoiceSpecification
Raised before retrieving the invoice specification for item tracking on a sales line.
[IntegrationEvent(True,False)]
local procedure OnBeforeRetrieveInvoiceSpecification(var SalesLine: Record "Sales Line"; var OK: Boolean; var IsHandled: Boolean; var TempInvoicingSpecification: Record "Tracking Specification" temporary)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line for which to retrieve the specification. |
| OK | Boolean |
Set to the result of the retrieval operation. |
| IsHandled | Boolean |
Set to true to skip the default retrieval logic. |
| TempInvoicingSpecification | Table Microsoft.Inventory.Tracking."Tracking Specification" |
The temporary tracking specification record for invoicing. |
OnBeforeRetrieveInvoiceSpecification2
Raised before retrieving the invoice specification (variant 2) for item tracking on a sales line.
[IntegrationEvent(False,False)]
local procedure OnBeforeRetrieveInvoiceSpecification2(var SalesLine: Record "Sales Line"; var OK: Boolean; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line for which to retrieve the specification. |
| OK | Boolean |
Set to the result of the retrieval operation. |
| IsHandled | Boolean |
Set to true to skip the default retrieval logic. |
OnBeforeTransferSaleLineToSalesLine
Raised before transferring reservation entries from one sales line to another.
[IntegrationEvent(False,False)]
local procedure OnBeforeTransferSaleLineToSalesLine(var OldSalesLine: Record "Sales Line"; var NewSalesLine: Record "Sales Line"; var TransferQty: Decimal; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| OldSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The source sales line from which to transfer. |
| NewSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The destination sales line to which to transfer. |
| TransferQty | Decimal |
The quantity to transfer. |
| IsHandled | Boolean |
Set to true to skip the default transfer logic. |
OnBeforeVerifyChange
Raised before verifying changes to a sales line that may affect reservations.
[IntegrationEvent(False,False)]
local procedure OnBeforeVerifyChange(var NewSalesLine: Record "Sales Line"; var OldSalesLine: Record "Sales Line"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| NewSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The modified sales line. |
| OldSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The original sales line before modification. |
| IsHandled | Boolean |
Set to true to skip the default verification logic. |
OnCreateReservationOnBeforeTestVariantCode
Raised before testing the variant code during reservation creation.
[IntegrationEvent(False,False)]
local procedure OnCreateReservationOnBeforeTestVariantCode(SalesLine: Record "Sales Line"; FromTrackingSpecification: Record "Tracking Specification"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line for which the reservation is being created. |
| FromTrackingSpecification | Table Microsoft.Inventory.Tracking."Tracking Specification" |
The tracking specification containing variant information. |
| IsHandled | Boolean |
Set to true to skip the default variant code test. |
OnCreateReservationOnBeforeTestLocationCode
Raised before testing the location code during reservation creation.
[IntegrationEvent(False,False)]
local procedure OnCreateReservationOnBeforeTestLocationCode(SalesLine: Record "Sales Line"; FromTrackingSpecification: Record "Tracking Specification"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line for which the reservation is being created. |
| FromTrackingSpecification | Table Microsoft.Inventory.Tracking."Tracking Specification" |
The tracking specification containing location information. |
| IsHandled | Boolean |
Set to true to skip the default location code test. |
OnTestSalesLineModificationOnBeforeTestBinCode
Raised before testing the bin code when verifying sales line modifications.
[IntegrationEvent(False,False)]
local procedure OnTestSalesLineModificationOnBeforeTestBinCode(var NewSalesLine: Record "Sales Line"; var OldSalesLine: Record "Sales Line"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| NewSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The modified sales line. |
| OldSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The original sales line before modification. |
| IsHandled | Boolean |
Set to true to skip the default bin code test. |
OnTestSalesLineModificationOnBeforeTestJobNo
Raised before testing the job number when verifying sales line modifications.
[IntegrationEvent(False,False)]
local procedure OnTestSalesLineModificationOnBeforeTestJobNo(SalesLine: Record "Sales Line"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line being tested. |
| IsHandled | Boolean |
Set to true to skip the default job number test. |
OnTestSalesLineModificationOnBeforeTestVariantCode
Raised before testing the variant code when verifying sales line modifications.
[IntegrationEvent(False,False)]
local procedure OnTestSalesLineModificationOnBeforeTestVariantCode(var NewSalesLine: Record "Sales Line"; var OldSalesLine: Record "Sales Line"; var IsHandled: Boolean; var HasError: Boolean; ThrowError: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| NewSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The modified sales line. |
| OldSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The original sales line before modification. |
| IsHandled | Boolean |
Set to true to skip the default variant code test. |
| HasError | Boolean |
Set to true if an error condition was detected. |
| ThrowError | Boolean |
Indicates whether errors should be thrown. |
OnTestSalesLineModificationOnBeforeTestLocationCode
Raised before testing the location code when verifying sales line modifications.
[IntegrationEvent(False,False)]
local procedure OnTestSalesLineModificationOnBeforeTestLocationCode(var NewSalesLine: Record "Sales Line"; var OldSalesLine: Record "Sales Line"; var IsHandled: Boolean; var HasError: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| NewSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The modified sales line. |
| OldSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The original sales line before modification. |
| IsHandled | Boolean |
Set to true to skip the default location code test. |
| HasError | Boolean |
Set to true if an error condition was detected. |
OnTransferSalesLineToItemJnlLineOnBeforeItemJournalLineTest
Raised before testing the item journal line during transfer from sales line.
[IntegrationEvent(False,False)]
local procedure OnTransferSalesLineToItemJnlLineOnBeforeItemJournalLineTest(SalesLine: Record "Sales Line"; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line"; var TransferQty: Decimal)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The source sales line. |
| IsHandled | Boolean |
Set to true to skip the default test. |
| ItemJnlLine | Table Microsoft.Inventory.Journal."Item Journal Line" |
The destination item journal line. |
| TransferQty | Decimal |
The quantity being transferred. |
OnTransferSalesLineToItemJnlLineOnBeforeInitRecordSet
Raised before initializing the record set during transfer of sales line to item journal line.
[IntegrationEvent(False,False)]
local procedure OnTransferSalesLineToItemJnlLineOnBeforeInitRecordSet(var OldReservationEntry: Record "Reservation Entry")
Parameters
| Name | Type | Description |
|---|---|---|
| OldReservationEntry | Table Microsoft.Inventory.Tracking."Reservation Entry" |
The reservation entry being processed. |
OnTransferSalesLineToItemJnlLineOnBeforeOldReservEntryTest
Raised before testing the old reservation entry during transfer from sales line to item journal line.
[IntegrationEvent(False,False)]
local procedure OnTransferSalesLineToItemJnlLineOnBeforeOldReservEntryTest(SalesLine: Record "Sales Line"; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The source sales line. |
| IsHandled | Boolean |
Set to true to skip the default test. |
| ItemJnlLine | Table Microsoft.Inventory.Journal."Item Journal Line" |
The destination item journal line. |
OnTransferSalesLineToItemJnlLineOnBeforeTransferReservationEntry
Raised before transferring the reservation entry from sales line to item journal line.
[IntegrationEvent(False,False)]
local procedure OnTransferSalesLineToItemJnlLineOnBeforeTransferReservationEntry(var ReservationEntry: Record "Reservation Entry"; SalesLine: Record "Sales Line"; ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| ReservationEntry | Table Microsoft.Inventory.Tracking."Reservation Entry" |
The reservation entry being transferred. |
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The source sales line. |
| ItemJournalLine | Table Microsoft.Inventory.Journal."Item Journal Line" |
The destination item journal line. |
| IsHandled | Boolean |
Set to true to skip the default transfer logic. |
OnTransferSaleLineToSalesLineOnBeforeCalcTransferQty
Raised before calculating the transfer quantity when transferring between sales lines.
[IntegrationEvent(False,False)]
local procedure OnTransferSaleLineToSalesLineOnBeforeCalcTransferQty(var NewSalesLine: Record "Sales Line"; var OldReservationEntry: Record "Reservation Entry"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| NewSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The destination sales line. |
| OldReservationEntry | Table Microsoft.Inventory.Tracking."Reservation Entry" |
The source reservation entry. |
| IsHandled | Boolean |
Set to true to skip the default calculation. |
OnVerifyChangeOnBeforeHasError
Raised before determining if an error occurred when verifying changes to a sales line.
[IntegrationEvent(False,False)]
local procedure OnVerifyChangeOnBeforeHasError(NewSalesLine: Record "Sales Line"; OldSalesLine: Record "Sales Line"; var HasError: Boolean; var ShowError: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| NewSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The modified sales line. |
| OldSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The original sales line before modification. |
| HasError | Boolean |
Set to true if an error condition was detected. |
| ShowError | Boolean |
Set to true if the error should be displayed to the user. |
OnTransferSalesLineToItemJnlLineOnBeforeApplFromItemEntryTestField
Raised before testing the Appl.-from Item Entry field during transfer from sales line to item journal line.
[IntegrationEvent(False,False)]
local procedure OnTransferSalesLineToItemJnlLineOnBeforeApplFromItemEntryTestField(SalesLine: Record "Sales Line"; OldReservEntry: Record "Reservation Entry"; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The source sales line. |
| OldReservEntry | Table Microsoft.Inventory.Tracking."Reservation Entry" |
The source reservation entry. |
| IsHandled | Boolean |
Set to true to skip the default test. |
| ItemJnlLine | Table Microsoft.Inventory.Journal."Item Journal Line" |
The destination item journal line. |
OnBeforeCallItemTracking
Raised before calling the item tracking page for a sales line.
[IntegrationEvent(False,False)]
local procedure OnBeforeCallItemTracking(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line for which to open item tracking. |
| IsHandled | Boolean |
Set to true to skip the default item tracking call. |
OnBeforeCreateReservation
Raised before creating a reservation for a sales line.
[IntegrationEvent(False,False)]
local procedure OnBeforeCreateReservation(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line for which to create the reservation. |
| IsHandled | Boolean |
Set to true to skip the default reservation creation. |
OnBeforeDeleteInvoiceSpecFromHeader
Raised before deleting invoice specifications from a sales header.
[IntegrationEvent(False,False)]
local procedure OnBeforeDeleteInvoiceSpecFromHeader(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesHeader | Table Microsoft.Sales.Document."Sales Header" |
The sales header from which to delete specifications. |
| IsHandled | Boolean |
Set to true to skip the default deletion logic. |
OnBeforeDeleteInvoiceSpecFromLine
Raised before deleting invoice specifications from a sales line.
[IntegrationEvent(False,False)]
local procedure OnBeforeDeleteInvoiceSpecFromLine(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line from which to delete specifications. |
| IsHandled | Boolean |
Set to true to skip the default deletion logic. |
OnBeforeVerifyQuantity
Raised before verifying quantity changes on a sales line that may affect reservations.
[IntegrationEvent(False,False)]
local procedure OnBeforeVerifyQuantity(var NewSalesLine: Record "Sales Line"; var IsHandled: Boolean; var OldSalesLine: Record "Sales Line")
Parameters
| Name | Type | Description |
|---|---|---|
| NewSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The modified sales line. |
| IsHandled | Boolean |
Set to true to skip the default quantity verification. |
| OldSalesLine | Table Microsoft.Sales.Document."Sales Line" |
The original sales line before modification. |
OnBeforeTransferSalesLineToItemJnlLine
Raised before transferring a sales line to an item journal line.
[IntegrationEvent(False,False)]
local procedure OnBeforeTransferSalesLineToItemJnlLine(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var ItemJnlLine: Record "Item Journal Line")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The source sales line. |
| IsHandled | Boolean |
Set to true to skip the default transfer logic. |
| ItemJnlLine | Table Microsoft.Inventory.Journal."Item Journal Line" |
The destination item journal line. |
OnCallItemTrackingOnBeforeItemTrackingLinesRunModal
[IntegrationEvent(False,False)]
local procedure OnCallItemTrackingOnBeforeItemTrackingLinesRunModal(var SalesLine: Record "Sales Line"; var ItemTrackingLines: Page "Item Tracking Lines")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" | |
| ItemTrackingLines | Page Microsoft.Inventory.Tracking."Item Tracking Lines" |
OnCallItemTrackingSecondSourceOnBeforeItemTrackingLinesRun
[IntegrationEvent(False,False)]
local procedure OnCallItemTrackingSecondSourceOnBeforeItemTrackingLinesRun(var SalesLine: Record "Sales Line"; var ItemTrackingLines: Page "Item Tracking Lines")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" | |
| ItemTrackingLines | Page Microsoft.Inventory.Tracking."Item Tracking Lines" |
OnCallItemTrackingSecondSourceOnBeforeOpenItemTrackingLines
Raised before opening item tracking lines for a secondary source on a sales line.
[IntegrationEvent(False,False)]
local procedure OnCallItemTrackingSecondSourceOnBeforeOpenItemTrackingLines(var SalesLine: Record "Sales Line"; TrackingSpecification: Record "Tracking Specification"; SecondSourceQuantityArray: array[3] of Decimal; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line for which item tracking is being opened. |
| TrackingSpecification | Table Microsoft.Inventory.Tracking."Tracking Specification" |
The tracking specification for the item. |
| SecondSourceQuantityArray | array[3] of Decimal |
Array containing secondary source quantities. |
| IsHandled | Boolean |
Set to true to skip the default item tracking opening. |
OnRetrieveInvoiceSpecificationOnBeforeInsert
Raised before inserting a tracking specification when retrieving invoice specifications.
[IntegrationEvent(False,False)]
local procedure OnRetrieveInvoiceSpecificationOnBeforeInsert(var TempInvoicingSpecification: Record "Tracking Specification" temporary; ReservEntry: Record "Reservation Entry")
Parameters
| Name | Type | Description |
|---|---|---|
| TempInvoicingSpecification | Table Microsoft.Inventory.Tracking."Tracking Specification" |
The temporary invoicing specification to insert. |
| ReservEntry | Table Microsoft.Inventory.Tracking."Reservation Entry" |
The source reservation entry. |
OnCreateReservationOnBeforeCheckReservedQty
Raised before checking the reserved quantity during reservation creation.
[IntegrationEvent(False,False)]
local procedure OnCreateReservationOnBeforeCheckReservedQty(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; QuantityBase: Decimal)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line for which the reservation is being created. |
| IsHandled | Boolean |
Set to true to skip the default reserved quantity check. |
| QuantityBase | Decimal |
The base quantity to check against. |
OnCreateReservationOnBeforeCreateReservEntry
Raised before creating a reservation entry during reservation creation.
[IntegrationEvent(False,False)]
local procedure 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)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line for which the reservation is being created. |
| Quantity | Decimal |
The quantity to reserve. |
| QuantityBase | Decimal |
The base quantity to reserve. |
| ForReservEntry | Table Microsoft.Inventory.Tracking."Reservation Entry" |
The reservation entry template. |
| IsHandled | Boolean |
Set to true to skip the default reservation entry creation. |
| FromTrackingSpecification | Table Microsoft.Inventory.Tracking."Tracking Specification" |
The source tracking specification. |
| ExpectedReceiptDate | Date |
The expected receipt date for the reservation. |
| Description | Text[100] |
The description for the reservation entry. |
| ShipmentDate | Date |
The shipment date for the reservation. |
| DoCreateReservationEntry | Boolean |
Set to false to prevent the reservation entry from being created. |
OnAfterCreateReservation
Raised after creating a reservation for a sales line.
[IntegrationEvent(False,False)]
local procedure OnAfterCreateReservation(var SalesLine: Record "Sales Line")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line for which the reservation was created. |
OnBeforeDeleteLine
Raised before deleting reservation entries for a sales line.
[IntegrationEvent(False,False)]
local procedure OnBeforeDeleteLine(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line being deleted. |
| IsHandled | Boolean |
Set to true to skip the default deletion logic. |
OnBeforeAutoReserveSalesLine
Raised before automatically reserving a sales line.
[IntegrationEvent(False,False)]
local procedure 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")
Parameters
| Name | Type | Description |
|---|---|---|
| ReservSummEntryNo | Integer |
The reservation summary entry number. |
| RemainingQtyToReserve | Decimal |
The remaining quantity to reserve. |
| RemainingQtyToReserveBase | Decimal |
The remaining base quantity to reserve. |
| Description | Text[100] |
The description for the reservation. |
| AvailabilityDate | Date |
The availability date for the reservation. |
| IsReserved | Boolean |
Set to true if the reservation was handled. |
| Search | Text[1] |
The search direction for finding entries. |
| NextStep | Integer |
The next step value for iterating through entries. |
| CalcReservEntry | Table Microsoft.Inventory.Tracking."Reservation Entry" |
The reservation entry used for calculation. |
OnCreateReservationOnBeforeCreateReservation
Raised before creating a reservation from the reservation management event handler.
[IntegrationEvent(False,False)]
local procedure 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")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line for which the reservation is being created. |
| TrackingSpecification | Table Microsoft.Inventory.Tracking."Tracking Specification" |
The tracking specification for the reservation. |
| Description | Text[100] |
The description for the reservation. |
| ExpectedDate | Date |
The expected date for the reservation. |
| Quantity | Decimal |
The quantity to reserve. |
| QuantityBase | Decimal |
The base quantity to reserve. |
| ReservationEntry | Table Microsoft.Inventory.Tracking."Reservation Entry" |
The reservation entry template. |
OnSetSourceForReservationOnBeforeUpdateReservation
Obsolete
This element will become obsolete from version 27.0. This event is never raised.
[Obsolete(This event is never raised.,27.0)]
[IntegrationEvent(False,False)]
local procedure OnSetSourceForReservationOnBeforeUpdateReservation(var ReservEntry: Record "Reservation Entry"; SalesLine: Record "Sales Line")
Parameters
| Name | Type | Description |
|---|---|---|
| ReservEntry | Table Microsoft.Inventory.Tracking."Reservation Entry" | |
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
OnAfterSetSourceForReservation
Obsolete
This element will become obsolete from version 27.0. This event is never raised.
[Obsolete(This event is never raised.,27.0)]
[IntegrationEvent(False,False)]
local procedure OnAfterSetSourceForReservation(var CalcReservEntry: Record "Reservation Entry"; SalesLine: Record "Sales Line")
Parameters
| Name | Type | Description |
|---|---|---|
| CalcReservEntry | Table Microsoft.Inventory.Tracking."Reservation Entry" | |
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
OnAfterInitFromSalesLine
Raised after initializing a tracking specification from a sales line.
[IntegrationEvent(False,False)]
local procedure OnAfterInitFromSalesLine(var TrackingSpecification: Record "Tracking Specification"; SalesLine: Record "Sales Line")
Parameters
| Name | Type | Description |
|---|---|---|
| TrackingSpecification | Table Microsoft.Inventory.Tracking."Tracking Specification" |
The tracking specification that was initialized. |
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The source sales line. |
OnBeforeCheckSourceTypeSubtypeOnBeforeIsError
Raised before checking the source type and subtype for error conditions in reservation entries.
[IntegrationEvent(False,False)]
local procedure OnBeforeCheckSourceTypeSubtypeOnBeforeIsError(var ReservationEntry: Record "Reservation Entry"; var IsError: Boolean; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| ReservationEntry | Table Microsoft.Inventory.Tracking."Reservation Entry" |
The reservation entry being checked. |
| IsError | Boolean |
Set to true if an error condition was detected. |
| IsHandled | Boolean |
Set to true to skip the default check logic. |