Table "Sales Line"

ID 37
Namespace: Microsoft.Sales.Document

Stores line-level details for sales documents including items, quantities, prices, and discounts.

Properties

Name Value
Caption Sales Line
DrillDownPageID Page Microsoft.Sales.Document."Sales Lines"
LookupPageID Page Microsoft.Sales.Document."Sales Lines"
Permissions TableData "Sales Line" = m
DataClassification CustomerContent

Fields

Name Type Description
"Document Type" Enum Microsoft.Sales.Document."Sales Document Type"

Specifies the type of sales document such as quote, order, invoice, credit memo, blanket order, or return order.

"Sell-to Customer No." Code[20]

Specifies the number of the customer who will receive the items and be billed for them.

"Document No." Code[20]

Specifies the document number that this line belongs to.

"Line No." Integer

Specifies the sequential number assigned to this line within the document.

Type Enum Microsoft.Sales.Document."Sales Line Type"

Specifies the type of entity on this line such as Item, Resource, G/L Account, Fixed Asset, or Charge.

"No." Code[20]

Specifies the number of the entity based on the line type, such as item number, G/L account, or resource code.

"Location Code" Code[10]

Specifies the location from which the items on this line will be shipped.

"Posting Group" Code[20]

Specifies the inventory posting group or fixed asset posting group that applies to this line.

"Shipment Date" Date

Specifies the date when the items on this line are expected to be shipped.

Description Text[100]

Contains a description of the item, resource, or other entity on this line.

"Description 2" Text[50]

Contains additional description text for the line item.

"Unit of Measure" Text[50]

Specifies the text description of the unit of measure for the quantity.

Quantity Decimal

Specifies the number of units being sold on this line.

"Outstanding Quantity" Decimal

Specifies the quantity that has not yet been shipped or received for this line.

"Qty. to Invoice" Decimal

Specifies the quantity to be invoiced in the current posting operation.

"Qty. to Ship" Decimal

Specifies the quantity to be shipped in the current posting operation.

"Unit Price" Decimal

Specifies the selling price per unit of measure for this line.

"Unit Cost (LCY)" Decimal

Specifies the cost per unit in local currency for the item or resource on this line.

"VAT %" Decimal

Specifies the VAT percentage used to calculate the VAT amount on this line.

"Line Discount %" Decimal

Specifies the discount percentage applied to the unit price on this line.

"Line Discount Amount" Decimal

Specifies the discount amount deducted from the line amount before VAT.

Amount Decimal

Specifies the net amount for this line excluding VAT.

"Amount Including VAT" Decimal

Specifies the total amount for this line including VAT.

"Allow Invoice Disc." Boolean

Indicates whether this line is eligible for invoice discount calculation.

"Gross Weight" Decimal

Specifies the gross weight of one unit of the item on this line.

"Net Weight" Decimal

Specifies the net weight of one unit of the item on this line.

"Units per Parcel" Decimal

Specifies how many units of the item can fit in one parcel for shipping.

"Unit Volume" Decimal

Specifies the volume of one unit of the item on this line.

"Appl.-to Item Entry" Integer

Specifies a specific item ledger entry to apply this transaction to for cost application.

"Shortcut Dimension 1 Code" Code[20]

Specifies the code for the first global dimension used for analysis.

"Shortcut Dimension 2 Code" Code[20]

Specifies the code for the second global dimension used for analysis.

"Customer Price Group" Code[10]

Specifies the customer price group used for calculating the unit price on this line.

"Job No." Code[20]

Specifies the project number that this sales line is linked to.

"Work Type Code" Code[10]

Specifies the type of work performed by the resource for pricing purposes.

"Recalculate Invoice Disc." Boolean

Indicates that the invoice discount should be recalculated for this line.

"Outstanding Amount" Decimal

Specifies the outstanding amount yet to be shipped or invoiced for this line.

"Qty. Shipped Not Invoiced" Decimal

Specifies the quantity that has been shipped but not yet invoiced.

"Shipped Not Invoiced" Decimal

Specifies the amount for shipped quantities that have not yet been invoiced.

"Quantity Shipped" Decimal

Specifies the total quantity that has been shipped from this sales line.

"Quantity Invoiced" Decimal

Specifies the total quantity that has been invoiced for this sales line.

"Shipment No." Code[20]

Specifies the number of the posted shipment document that this line originated from.

"Shipment Line No." Integer

Specifies the line number in the posted shipment document that this line originated from.

"Profit %" Decimal

Specifies the profit margin percentage for this line based on unit price and cost.

"Bill-to Customer No." Code[20]

Specifies the customer number who will receive the invoice for this line.

"Inv. Discount Amount" Decimal

Specifies the invoice discount amount applied to this line.

"Purchase Order No." Code[20]

Specifies the purchase order number for drop shipment or special order linked to this sales line.

"Purch. Order Line No." Integer

Specifies the purchase order line number for drop shipment or special order linked to this sales line.

"Drop Shipment" Boolean

Indicates that the item will be shipped directly from the vendor to the customer without passing through inventory.

"Gen. Bus. Posting Group" Code[20]

Specifies the general business posting group for determining accounts when posting.

"Gen. Prod. Posting Group" Code[20]

Specifies the general product posting group for determining accounts when posting.

"VAT Calculation Type" Enum Microsoft.Foundation.Enums."Tax Calculation Type"

Specifies the method used to calculate VAT on this line.

"Transaction Type" Code[10]

Specifies the transaction type for Intrastat reporting purposes.

"Transport Method" Code[10]

Specifies the transport method used for Intrastat reporting purposes.

"Attached to Line No." Integer

Specifies the line number this comment or extended text line is attached to.

"Exit Point" Code[10]

Specifies the exit point for goods for Intrastat reporting purposes.

"Area" Code[10]

Specifies the area code for Intrastat reporting purposes.

"Transaction Specification" Code[10]

Specifies the transaction specification for Intrastat reporting purposes.

"Tax Category" Code[10]

Specifies the tax category code for electronic document reporting.

"Tax Area Code" Code[20]

Specifies the tax area that applies for sales tax calculation on this line.

"Tax Liable" Boolean

Indicates whether the line is subject to sales tax.

"Tax Group Code" Code[20]

Specifies the tax group that determines the tax rate for this line.

"VAT Clause Code" Code[20]

Specifies the VAT clause that applies to this line for special VAT reporting.

"VAT Bus. Posting Group" Code[20]

Specifies the VAT business posting group for determining VAT settings.

"VAT Prod. Posting Group" Code[20]

Specifies the VAT product posting group for determining VAT settings.

"Currency Code" Code[10]

Specifies the currency code for amounts on this line.

"Outstanding Amount (LCY)" Decimal

Specifies the outstanding amount in local currency that has not yet been shipped or invoiced.

"Shipped Not Invoiced (LCY)" Decimal

Specifies the shipped but not invoiced amount in local currency including VAT.

"Shipped Not Inv. (LCY) No VAT" Decimal

Specifies the shipped but not invoiced amount in local currency excluding VAT.

"Reserved Quantity" Decimal

Specifies the quantity that has been reserved from inventory for this line.

Reserve Enum Microsoft.Inventory.Tracking."Reserve Method"

Specifies the reservation policy for items on this line.

"Blanket Order No." Code[20]

Specifies the blanket order number that this line was created from.

"Blanket Order Line No." Integer

Specifies the blanket order line number that this line was created from.

"VAT Base Amount" Decimal

Specifies the base amount used to calculate VAT for this line.

"Unit Cost" Decimal

Specifies the cost per unit in the document currency.

"System-Created Entry" Boolean

Indicates that this line was created by the system and not manually by a user.

"Line Amount" Decimal

Specifies the calculated line amount before invoice discounts.

"VAT Difference" Decimal

Specifies the difference between the calculated VAT and manually adjusted VAT amount.

"Inv. Disc. Amount to Invoice" Decimal

Specifies the invoice discount amount that will be applied when the line is invoiced.

"VAT Identifier" Code[20]

Specifies the VAT identifier code that groups lines with the same VAT setup.

"IC Partner Ref. Type" Enum Microsoft.Intercompany.Partner."IC Partner Reference Type"

Specifies the type of intercompany partner reference for the line item.

"IC Partner Reference" Code[20]

Specifies the intercompany partner reference number for the item or G/L account.

"Prepayment %" Decimal

Specifies the prepayment percentage required for this line before shipping.

"Prepmt. Line Amount" Decimal

Specifies the prepayment amount calculated for this line based on the prepayment percentage.

"Prepmt. Amt. Inv." Decimal

Specifies the prepayment amount that has already been invoiced for this line.

"Prepmt. Amt. Incl. VAT" Decimal

Specifies the prepayment amount including VAT for this line.

"Prepayment Amount" Decimal

Specifies the calculated prepayment amount for this line.

"Prepmt. VAT Base Amt." Decimal

Specifies the base amount used to calculate VAT on the prepayment.

"Prepayment VAT %" Decimal

Specifies the VAT percentage applied to the prepayment amount.

"Prepmt. VAT Calc. Type" Enum Microsoft.Foundation.Enums."Tax Calculation Type"

Specifies the VAT calculation method for prepayments on this line.

"Prepayment VAT Identifier" Code[20]

Specifies the VAT identifier for prepayment VAT reporting.

"Prepayment Tax Area Code" Code[20]

Specifies the tax area code for sales tax calculation on prepayments.

"Prepayment Tax Liable" Boolean

Indicates whether sales tax applies to prepayments on this line.

"Prepayment Tax Group Code" Code[20]

Specifies the tax group code for sales tax calculation on prepayments.

"Prepmt Amt to Deduct" Decimal

Specifies the prepayment amount to deduct from the final invoice.

"Prepmt Amt Deducted" Decimal

Specifies the total prepayment amount already deducted from invoices for this line.

"Prepayment Line" Boolean

Indicates that this line is a prepayment line for invoicing purposes.

"Prepmt. Amount Inv. Incl. VAT" Decimal

Specifies the invoiced prepayment amount including VAT for this line.

"Prepmt. Amount Inv. (LCY)" Decimal

Specifies the invoiced prepayment amount in local currency.

"IC Partner Code" Code[20]

Specifies the intercompany partner code for transactions with related companies.

"Prepmt. VAT Amount Inv. (LCY)" Decimal

Specifies the invoiced prepayment VAT amount in local currency.

"Prepayment VAT Difference" Decimal

Specifies the difference between calculated and manually adjusted prepayment VAT.

"Prepmt VAT Diff. to Deduct" Decimal

Specifies the prepayment VAT difference amount to deduct.

"Prepmt VAT Diff. Deducted" Decimal

Specifies the prepayment VAT difference amount that has been deducted.

"IC Item Reference No." Code[50]

Specifies the item reference number for intercompany transactions.

"Pmt. Discount Amount" Decimal

Specifies the payment discount amount that applies to this line.

"Prepmt. Pmt. Discount Amount" Decimal

Specifies the payment discount amount for the prepayment on this line.

"Line Discount Calculation" Option

Specifies how the line discount was calculated such as by percentage or amount.

"Dimension Set ID" Integer

Specifies the unique identifier for the combination of dimensions assigned to this line.

"Qty. to Assemble to Order" Decimal

Specifies the quantity of assembly items to assemble to fulfill this sales order line.

"Qty. to Asm. to Order (Base)" Decimal

Specifies the quantity to assemble to order in base unit of measure.

"ATO Whse. Outstanding Qty." Decimal

Specifies the outstanding warehouse shipment quantity for assemble-to-order items.

"ATO Whse. Outstd. Qty. (Base)" Decimal

Specifies the outstanding warehouse shipment quantity in base unit for assemble-to-order items.

"Job Task No." Code[20]

Specifies the project task number linked to this sales line.

"Job Contract Entry No." Integer

Specifies the project contract entry number that this line was created from.

"Posting Date" Date

Specifies the posting date from the sales header for this line.

"Deferral Code" Code[10]

Specifies the deferral template code for spreading revenue recognition over multiple periods.

"Returns Deferral Start Date" Date

Specifies the start date for deferral schedule on return order lines.

"Selected Alloc. Account No." Code[20]

Specifies the allocation account number used for distributing amounts during posting.

"Alloc. Acc. Modified by User" Boolean

Indicates whether the allocation account distributions have been manually modified.

"Allocation Account No." Code[20]

Specifies the allocation account number used for posting allocation distributions.

"Alloc. Sales Line SystemId" Guid

Stores the system identifier linking to the allocation sales line.

"Variant Code" Code[10]

Specifies the variant code for the item on this line.

"Bin Code" Code[20]

Specifies the bin code where the item is located or will be placed.

"Qty. per Unit of Measure" Decimal

Specifies the conversion factor between the unit of measure and the base unit of measure.

Planned Boolean

Indicates that planning has been run for this line.

"Qty. Rounding Precision" Decimal

Specifies the rounding precision for quantities in the unit of measure.

"Qty. Rounding Precision (Base)" Decimal

Specifies the rounding precision for quantities in the base unit of measure.

"Unit of Measure Code" Code[10]

Specifies the unit of measure code for the quantity on this line.

"Quantity (Base)" Decimal

Specifies the quantity in the base unit of measure.

"Outstanding Qty. (Base)" Decimal

Specifies the outstanding quantity in the base unit of measure.

"Qty. to Invoice (Base)" Decimal

Specifies the quantity to invoice in the base unit of measure.

"Qty. to Ship (Base)" Decimal

Specifies the quantity to ship in the base unit of measure.

"Qty. Shipped Not Invd. (Base)" Decimal

Specifies the shipped but not invoiced quantity in the base unit of measure.

"Qty. Shipped (Base)" Decimal

Specifies the shipped quantity in the base unit of measure.

"Qty. Invoiced (Base)" Decimal

Specifies the invoiced quantity in the base unit of measure.

"Reserved Qty. (Base)" Decimal

Specifies the reserved quantity in the base unit of measure.

"FA Posting Date" Date

Specifies the posting date for the fixed asset transaction.

"Depreciation Book Code" Code[10]

Specifies the depreciation book code for fixed asset accounting.

"Depr. until FA Posting Date" Boolean

Indicates whether depreciation should be calculated up to the fixed asset posting date.

"Duplicate in Depreciation Book" Code[10]

Specifies the depreciation book to duplicate the fixed asset transaction into.

"Use Duplication List" Boolean

Indicates whether to use the duplication list for posting fixed asset transactions.

"Responsibility Center" Code[10]

Specifies the responsibility center code for this sales line.

"Out-of-Stock Substitution" Boolean

Indicates that the item was substituted due to being out of stock.

"Substitution Available" Boolean

Indicates whether a substitute item is available for this line.

"Originally Ordered No." Code[20]

Specifies the original item number before substitution occurred.

"Originally Ordered Var. Code" Code[10]

Specifies the original variant code before substitution occurred.

"Item Category Code" Code[20]

Specifies the item category code for classification purposes.

Nonstock Boolean

Indicates that this line contains a catalog or non-inventory item.

"Purchasing Code" Code[10]

Specifies the purchasing code that determines drop shipment or special order handling.

"Special Order" Boolean

Indicates that this line is a special order requiring a dedicated purchase order.

"Special Order Purchase No." Code[20]

Specifies the purchase order number linked to this special order line.

"Special Order Purch. Line No." Integer

Specifies the purchase order line number linked to this special order line.

"Item Reference No." Code[50]

Specifies the item reference number such as a barcode or customer item number.

"Item Reference Unit of Measure" Code[10]

Specifies the unit of measure associated with the item reference.

"Item Reference Type" Enum Microsoft.Inventory.Item.Catalog."Item Reference Type"

Specifies the type of item reference such as customer, vendor, or barcode.

"Item Reference Type No." Code[30]

Specifies the number associated with the item reference type.

"Whse. Outstanding Qty." Decimal

Specifies the outstanding warehouse shipment quantity for this line.

"Whse. Outstanding Qty. (Base)" Decimal

Specifies the outstanding warehouse shipment quantity in base unit for this line.

"Completely Shipped" Boolean

Indicates that the full quantity on this line has been shipped.

"Requested Delivery Date" Date

Specifies the date that the customer requested for delivery.

"Promised Delivery Date" Date

Specifies the date that was promised for delivery to the customer.

"Shipping Time" DateFormula

Specifies the time needed for shipping from the warehouse to the customer.

"Outbound Whse. Handling Time" DateFormula

Specifies the time needed to handle items in the outbound warehouse.

"Planned Delivery Date" Date

Specifies the calculated date when the items are planned to arrive at the customer.

"Planned Shipment Date" Date

Specifies the calculated date when the items are planned to ship from the warehouse.

"Shipping Agent Code" Code[10]

Specifies the shipping agent code for delivering items on this line.

"Shipping Agent Service Code" Code[10]

Specifies the shipping agent service code that determines shipping time.

"Allow Item Charge Assignment" Boolean

Indicates whether item charges can be assigned to this line.

"Qty. to Assign" Decimal

Specifies the quantity of item charges to assign from this line.

"Qty. Assigned" Decimal

Specifies the quantity of item charges that have been assigned from this line.

"Return Qty. to Receive" Decimal

Specifies the quantity to receive for sales return order lines.

"Return Qty. to Receive (Base)" Decimal

Specifies the return quantity to receive in the base unit of measure.

"Return Qty. Rcd. Not Invd." Decimal

Specifies the return quantity received but not yet invoiced.

"Ret. Qty. Rcd. Not Invd.(Base)" Decimal

Specifies the return quantity received but not yet invoiced in base unit of measure.

"Return Rcd. Not Invd." Decimal

Specifies the amount for return quantities received but not yet invoiced.

"Return Rcd. Not Invd. (LCY)" Decimal

Specifies the amount for returns received but not invoiced in local currency.

"Return Qty. Received" Decimal

Specifies the total quantity received for this sales return line.

"Return Qty. Received (Base)" Decimal

Specifies the return quantity received in the base unit of measure.

"Appl.-from Item Entry" Integer

Specifies a specific item ledger entry to apply this return to for cost application.

"Item Charge Qty. to Handle" Decimal

Specifies the quantity of item charges to handle for this line.

"BOM Item No." Code[20]

Specifies the bill of materials item number when selling a BOM component.

"Return Receipt No." Code[20]

Specifies the return receipt document number that this line originated from.

"Return Receipt Line No." Integer

Specifies the return receipt line number that this line originated from.

"Return Reason Code" Code[10]

Specifies the reason code for the sales return.

"Copied From Posted Doc." Boolean

Indicates that this line was copied from a posted document.

"Price Calculation Method" Enum Microsoft.Pricing.Calculation."Price Calculation Method"

Specifies the price calculation method used for this line.

"Allow Line Disc." Boolean

Indicates whether line discounts are allowed on this line.

"Customer Disc. Group" Code[20]

Specifies the customer discount group used for discount calculation.

Subtype Option

Specifies the subtype classification for the line.

"Price description" Text[80]

Contains a description of how the price was determined.

"Attached Doc Count" Integer

Specifies the number of documents attached to this line.

"Attached Lines Count" Integer

Specifies the number of lines attached to this line such as extended text.

"Sell-to Customer Name" Text[100]

Specifies the name of the sell-to customer for this line.

SystemId Guid
SystemCreatedAt DateTime
SystemCreatedBy Guid
SystemModifiedAt DateTime
SystemModifiedBy Guid
SystemRowVersion BigInteger

Methods

SetSkipEnsurePositiveLineNo

Obsolete

This element will become obsolete from version 28.0. Not used anymore

[Obsolete(Not used anymore,28.0)]
procedure SetSkipEnsurePositiveLineNo(NewSkipEnsurePositiveLineNo: Boolean)

Parameters

Name Type Description
NewSkipEnsurePositiveLineNo Boolean

InitOutstanding

Updates outstanding quantities and amounts to reflect changes in posted quantities and amounts.

procedure InitOutstanding()

InitOutstandingAmount

Updates outstanding amounts to reflect changes in quantity.

procedure InitOutstandingAmount()

InitQtyToShip

Updates quantity to ship and quantity to invoice based on the outstanding quantities

procedure InitQtyToShip()

InitQtyToReceive

Updates quantity to receive and quantity to invoice based on the outstanding quantity and document type.

procedure InitQtyToReceive()

InitQtyToInvoice

Prepares the sales line for the next invoice posting by setting the quantities and amounts to be invoiced.

procedure InitQtyToInvoice()

MaxQtyToInvoice

Determines the maximum quantity that can be invoiced for the current sales line.

procedure MaxQtyToInvoice(): Decimal

Returns

Type Description
Decimal

The maximum quantity that can be invoiced.

MaxQtyToInvoiceBase

Determines the maximum quantity (base) that can be invoiced for the current sales line.

procedure MaxQtyToInvoiceBase(): Decimal

Returns

Type Description
Decimal

The maximum quantity (base) that can be invoiced.

MaxQtyToShipBase

Ensures that the quantity to ship does not exceed the outstanding quantity.

procedure MaxQtyToShipBase(QtyToShipBase: Decimal): Decimal

Parameters

Name Type Description
QtyToShipBase Decimal

The quantity to ship to be checked.

Returns

Type Description
Decimal

The maximum quantity that can be shipped.

CalcLineAmount

Calculates the net line amount after applying the invoice discount.

procedure CalcLineAmount(): Decimal

Returns

Type Description
Decimal

The calculated line amount.

CalcShipmentDateForLocation

Updates the shipment date based on the location's customized calendar.

procedure CalcShipmentDateForLocation()

GetSkipTaxCalculation

Returns the value of global SkipTaxCalculation flag. The flag is unused in the object.

procedure GetSkipTaxCalculation(): Boolean

Returns

Type Description
Boolean

The value of global SkipTaxCalculation flag.

SetSkipTaxCalulation

Sets the value of global SkipTaxCalculation flag. The flag is unused in the object.

procedure SetSkipTaxCalulation(Skip: Boolean)

Parameters

Name Type Description
Skip Boolean

The value to set.

SetSalesHeader

Updates the global SalesHeader variable and initializes the currency based on the new sales header.

procedure SetSalesHeader(NewSalesHeader: Record "Sales Header")

Parameters

Name Type Description
NewSalesHeader Table Microsoft.Sales.Document."Sales Header"

The sales header to set.

Remarks

The global SalesHeader is used whenever data from the sales header is used in other procedures on the object.

GetSalesHeader

Gets the sales header associated with the sales line. Ensures the global SalesHeader variable is correctly set.

procedure GetSalesHeader(): Record "Sales Header"

Returns

Type Description
Table Microsoft.Sales.Document."Sales Header"

The sales header of the current line.

GetSalesHeader

Gets the sales header and the currency associated with the sales line. Ensures that the global SalesHeader variable and the currency are correctly set.

procedure GetSalesHeader(var OutSalesHeader: Record "Sales Header"; var OutCurrency: Record Currency)

Parameters

Name Type Description
OutSalesHeader Table Microsoft.Sales.Document."Sales Header"

Return value: The sales header of the current line.

OutCurrency Table Microsoft.Finance.Currency.Currency

Return value: The currency of the current line.

GetItem

Gets the item record from the item number on the sales line.

procedure GetItem(): Record Item

Returns

Type Description
Table Microsoft.Inventory.Item.Item

The item record.

GetItem

Gets the item record from the the item number on the sales line.

procedure GetItem(var Item: Record Item)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item

Return value: The item record.

GetResource

Gets the resource record from the resource number on the sales line. The global Resource variable is updated with the retrieved resource.

procedure GetResource(): Record Resource

Returns

Type Description
Table Microsoft.Projects.Resources.Resource.Resource

The resource record.

GetRemainingQty

Calculates the quantity and quantity (base) that remain unreserved on the sales line.

procedure GetRemainingQty(var RemainingQty: Decimal; var RemainingQtyBase: Decimal)

Parameters

Name Type Description
RemainingQty Decimal

Return value: The remaining unreserved quantity.

RemainingQtyBase Decimal

Return value: The remaining unreserved quantity (base).

GetReservationQty

Gets the quantities related to reservations for the sales line.

procedure GetReservationQty(var QtyReserved: Decimal; var QtyReservedBase: Decimal; var QtyToReserve: Decimal; var QtyToReserveBase: Decimal): Decimal

Parameters

Name Type Description
QtyReserved Decimal

Return value: The reserved quantity.

QtyReservedBase Decimal

Return value: The reserved quantity (base).

QtyToReserve Decimal

Return value: The quantity to reserve.

QtyToReserveBase Decimal

Return value: The quantity to reserve (base).

Returns

Type Description
Decimal

The quantity per unit of measure.

GetSourceCaption

Returns a caption containing the document type, document number and line number separated by spaces for the sales line.

procedure GetSourceCaption(): Text

Returns

Type Description
Text

The formatted text.

SetReservationEntry

Initializes the reservation entry with information from the sales line.

procedure SetReservationEntry(var ReservEntry: Record "Reservation Entry")

Parameters

Name Type Description
ReservEntry Table Microsoft.Inventory.Tracking."Reservation Entry"

Return value: The initialized reservation entry.

SetReservationFilters

Filters the reservation entries for the sales line.

procedure SetReservationFilters(var ReservEntry: Record "Reservation Entry")

Parameters

Name Type Description
ReservEntry Table Microsoft.Inventory.Tracking."Reservation Entry"

The reservation entry to filter.

ReservEntryExist

Checks if a reservation entry exists for the sales line.

procedure ReservEntryExist(): Boolean

Returns

Type Description
Boolean

True if a reservation entry exists, otherwise false.

IsPriceCalcCalledByField

Checks if the price calculation was triggered by a specific field.

procedure IsPriceCalcCalledByField(CurrPriceFieldNo: Integer): Boolean

Parameters

Name Type Description
CurrPriceFieldNo Integer

The field number of the field that triggered the price calculation.

Returns

Type Description
Boolean

True if the invoking field no. is the same as the planned field no., otherwise false.

PlanPriceCalcByField

Plans for a price calculation triggered by a specific field, ensuring that the calculation is performed only once.

procedure PlanPriceCalcByField(CurrPriceFieldNo: Integer)

Parameters

Name Type Description
CurrPriceFieldNo Integer

The field number of the field that can cause price calculation.

Remarks

This field no. is checked in IsPriceCalcCalledByField to determine if price calculation should be performed .

ClearFieldCausedPriceCalculation

Resets the tracking of the field that is planned to trigger a price calculation.

procedure ClearFieldCausedPriceCalculation()

UpdateUnitPrice

Updates the unit price on the sales line.

procedure UpdateUnitPrice(CalledByFieldNo: Integer)

Parameters

Name Type Description
CalledByFieldNo Integer

The field number of the field that triggered the price calculation.

UpdateUnitPriceByField

Updates the unit price on the sales line. The calculation is only performed if the field number of the field that triggered the price calculation is the same as the planned field no.

procedure UpdateUnitPriceByField(CalledByFieldNo: Integer)

Parameters

Name Type Description
CalledByFieldNo Integer

The field number of the field that triggered the price calculation.

CopyUnitPriceAndLineDiscountPct

Copies the unit price and line discount percentage from a blanket order sales line to this line.

procedure CopyUnitPriceAndLineDiscountPct(BlanketOrderSalesLine: Record "Sales Line"; CalledByFieldNo: Integer)

Parameters

Name Type Description
BlanketOrderSalesLine Table Microsoft.Sales.Document."Sales Line"

Specifies the blanket order sales line to copy values from.

CalledByFieldNo Integer

Specifies the field number that triggered this copy operation.

ShowUnitPriceChangedMsg

Displays a message when the unit price has changed for a credit document line copied from a posted document.

procedure ShowUnitPriceChangedMsg()

GetPriceCalculationHandler

Gets the "Price Calculation" implementation for the sales line.

procedure GetPriceCalculationHandler(PriceType: Enum "Price Type"; SalesHeader: Record "Sales Header"; var PriceCalculation: Interface "Price Calculation")

Parameters

Name Type Description
PriceType Enum Microsoft.Pricing.PriceList."Price Type"

The type of price calculation to get.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The sales header used for getting the price calculation.

PriceCalculation Interface Microsoft.Pricing.Calculation."Price Calculation"

Return value: The "Price Calculation" implementation.

GetLineWithPrice

Returns a default "Line With Price" implementation if not overridden.

procedure GetLineWithPrice(var LineWithPrice: Interface "Line With Price")

Parameters

Name Type Description
LineWithPrice Interface Microsoft.Pricing.PriceList."Line With Price"

Return value: The default or overridden "Line With Price" implementation.

ApplyDiscount

Applies the discount and assigns the calculated amount to the sales line.

procedure ApplyDiscount(var PriceCalculation: Interface "Price Calculation")

Parameters

Name Type Description
PriceCalculation Interface Microsoft.Pricing.Calculation."Price Calculation"

The "Price Calculation" implementation to use.

ApplyPrice

Applies the price and assigns the calculated amount to the sales line.

procedure ApplyPrice(CalledByFieldNo: Integer; var PriceCalculation: Interface "Price Calculation")

Parameters

Name Type Description
CalledByFieldNo Integer

The field number of the field that triggered the price calculation.

PriceCalculation Interface Microsoft.Pricing.Calculation."Price Calculation"

The "Price Calculation" implementation to use.

CountDiscount

Wrapper for price calculation method CountDiscount. Returns the number of price list lines with discounts that fit the sales line.

procedure CountDiscount(ShowAll: Boolean): Integer

Parameters

Name Type Description
ShowAll Boolean

If true it widens the filters set to the price list line.

Returns

Type Description
Integer

The number of price list lines with discounts.

CountPrice

Wrapper for price calculation method CountPrice. Returns the number of price list lines with prices that fit the sales line.

procedure CountPrice(ShowAll: Boolean): Integer

Parameters

Name Type Description
ShowAll Boolean

If true it widens the filters set to the price list line.

Returns

Type Description
Integer

The number of price list lines with prices.

DiscountExists

Wrapper for price calculation method DiscountExists. Returns true if any price list line with discount that fit the sales line exist.

procedure DiscountExists(ShowAll: Boolean): Boolean

Parameters

Name Type Description
ShowAll Boolean

If true it widens the filters set to the price list line.

Returns

Type Description
Boolean

True if any price list line is found, otherwise false.

PriceExists

Wrapper for price calculation method PriceExists. Returns true if any price list line with price or cost that fit the sales line exist.

procedure PriceExists(ShowAll: Boolean): Boolean

Parameters

Name Type Description
ShowAll Boolean

If true it widens the filters set to the price list line.

Returns

Type Description
Boolean

True if any price list line is found, otherwise false.

PickDiscount

Wrapper for price calculation method PickDiscount. Opens a price list selection to pick from lines with discount that fit the sales line. After the selection the amounts are assigned to the sales line.

procedure PickDiscount()

PickPrice

Wrapper for price calculation method PickPrice. Opens a price list selection to pick from lines with price or cost that fit the sales line. After the selection the amounts are assigned to the sales line.

procedure PickPrice()

UpdateReferencePriceAndDiscount

Applies the discount and price for "Item Reference No." field and assigns the calculated amount to the sales line.

procedure UpdateReferencePriceAndDiscount()

FindResUnitCost

Finds and applies the unit cost for a resource line based on the resource cost setup.

procedure FindResUnitCost()

FindResUnitCostOnAfterInitResCost

Raises the OnFindResUnitCostOnAfterInitResCost event after the resource cost record is initialized.

procedure FindResUnitCostOnAfterInitResCost(var ResourceCost: Record "Resource Cost")

Parameters

Name Type Description
ResourceCost Table Microsoft.Projects.Resources.Pricing."Resource Cost"

Specifies the initialized resource cost record.

AfterFindResUnitCost

Raises the OnAfterFindResUnitCost event after the resource unit cost is found.

procedure AfterFindResUnitCost(var ResourceCost: Record "Resource Cost")

Parameters

Name Type Description
ResourceCost Table Microsoft.Projects.Resources.Pricing."Resource Cost"

Specifies the resource cost record with the found unit cost.

UpdatePrepmtSetupFields

Updates the prepayment VAT fields on the sales line based on the VAT posting setup to account for updates on the prepayment sales line.

procedure UpdatePrepmtSetupFields()

CalculateOutstandingAmountExclTax

Calculates the outstanding amount excluding tax for the sales line.

procedure CalculateOutstandingAmountExclTax(): Decimal

Returns

Type Description
Decimal

The outstanding amount excluding tax.

CheckPrepmtAmounts

Validates that the prepayment amounts are consistent with the line amounts and invoiced amounts.

procedure CheckPrepmtAmounts()

ThrowWrongAmountError

Raises an error when the prepayment line amount is less than the prepayment amount invoiced.

procedure ThrowWrongAmountError()

UpdateAmounts

Updates line, prepayment, deferral, and VAT amounts for the sales line to account for any changes of the sales line that affect the amounts.

procedure UpdateAmounts()

UpdateVATAmounts

Updates the VAT amounts on the sales line based on the VAT calculation type and other line details to reflect changes in fields that affect them, like line amount, VAT %, and others.

procedure UpdateVATAmounts()

CheckItemAvailable

Verifies the availability of the item on the shipment date. If the item is not available, a notification is shown and an error is raised to stop the update.

procedure CheckItemAvailable(CalledByFieldNo: Integer)

Parameters

Name Type Description
CalledByFieldNo Integer

The field no. of the field that initiated the check.

Remarks

The check is only performed if CalledByFieldNo matches the field that initated the call stack (CurrFieldNo). If the shipment date is empty, it's set from either the header or the current work date.

ShowOrderTracking

Opens a Order Tracking summary page for the current sales line.

procedure ShowOrderTracking()

ShowReservation

Opens a reservation summary page for the current sales line. After the page closes, updates the planned status of the line.

procedure ShowReservation()

ShowReservationEntries

Opens a reservation entries page for the current sales line.

procedure ShowReservationEntries(Modal: Boolean)

Parameters

Name Type Description
Modal Boolean

If true, execution is paused until the page is closed.

AutoReserve

Attempts to automatically reserve the quantity of the current sales line based on the item availability. If the quantity cannot be reserved automatically, a message is shown and the user is prompted to reserve manually.

procedure AutoReserve()

AutoReserve

Attempts to automatically reserve the quantity of the current sales line based on the item availability.

procedure AutoReserve(ShowReservationForm: Boolean)

Parameters

Name Type Description
ShowReservationForm Boolean

If true, when the quantity cannot be reserved automatically, a message is shown and the user is prompted to reserve manually.

AutoAsmToOrder

Creates or updates the assembly order associated with the sales line to reflect the current line details.

procedure AutoAsmToOrder()

GetDate

Retrieves the date to be used for operations on the sales line, which is the associated sales header's posting date or the work date if the posting date is not set.

procedure GetDate(): Date

Returns

Type Description
Date

The date to be used for operations on the sales line.

CalcPlannedDeliveryDate

Calculates the planned delivery date based on the shipping agent, planned shipment date and the field that initiated the calculation.

procedure CalcPlannedDeliveryDate(CurrFieldNo: Integer): Date

Parameters

Name Type Description
CurrFieldNo Integer

The field number of the field that initiated the calculation.

Returns

Type Description
Date

The calculated planned delivery date.

CheckCustomerBaseCalendarCodeExist

Checks whether the sell-to customer has a base calendar code assigned.

procedure CheckCustomerBaseCalendarCodeExist(): Boolean

Returns

Type Description
Boolean

True if the customer has a base calendar code, otherwise false.

CalcPlannedShptDate

Calculates the planned shipment date based on the shipping agent and the field that initiated the calculation.

procedure CalcPlannedShptDate(CurrFieldNo: Integer): Date

Parameters

Name Type Description
CurrFieldNo Integer

The field number of the field that initiated the calculation.

Returns

Type Description
Date

The calculated planned shipment date.

CalcShipmentDate

Calculates the shipment date based on the shipping agent, location and planned shipment date.

procedure CalcShipmentDate(): Date

Returns

Type Description
Date

The calculated shipment date.

SignedXX

Adjusts the sign of the provided value based on the document type of the sales line.

procedure SignedXX(Value: Decimal): Decimal

Parameters

Name Type Description
Value Decimal

The value to adjust the sign of.

Returns

Type Description
Decimal

The value with its sign adjusted based on the document type.

ShowDimensions

Opens a page for editing dimensions for the sale line. After the page closes, updates the dimensions on the sales line and assembly orders.

procedure ShowDimensions(): Boolean

Returns

Type Description
Boolean

True if the dimensions were changed, otherwise, false.

Remarks

If the dimensions are changed for a line that is already shipped, a confirmation is raised. If not confirmed, and error is raised to stop the update.

OpenItemTrackingLines

Opens a page for editing item tracking lines for the sale line.

procedure OpenItemTrackingLines()

CreateDim

Initializes dimensions on the sales line for the provided list of default dimension sources.

procedure CreateDim(DefaultDimSource: List of [Dictionary of [Integer, Code[20]]])

Parameters

Name Type Description
DefaultDimSource List of [Dictionary of [Integer, Code[20]]]

The list of default dimension sources.

ValidateShortcutDimCode

Checks if the provided shortcut dimension code and value are valid.

procedure ValidateShortcutDimCode(FieldNumber: Integer; var ShortcutDimCode: Code[20])

Parameters

Name Type Description
FieldNumber Integer

The number of the shortcut dimension.

ShortcutDimCode Code[20]

The value of the shortcut dimension.

Remarks

Checks include if the dimension or value are blocked or if the value is allowed.

LookupShortcutDimCode

Opens a page for looking up a shortcut dimension code value.

procedure LookupShortcutDimCode(FieldNumber: Integer; var ShortcutDimCode: Code[20])

Parameters

Name Type Description
FieldNumber Integer

The number of the shortcut dimension.

ShortcutDimCode Code[20]

Return value: The value of the shortcut dimension.

Remarks

If the dimensions are changed for a line that is already shipped, a confirmation is raised. If not confirmed, and error is raised to stop the update.

ShowShortcutDimCode

Gets an array of shortcut dimension values from the dimensions of the sales line.

procedure ShowShortcutDimCode(var ShortcutDimCode: array[8] of Code[20])

Parameters

Name Type Description
ShortcutDimCode array[8] of Code[20]

Return value: The array of shortcut dimension values.

SelectMultipleItems

Opens a page for selecting multiple items to add to the document. Selected items are added to the document.

procedure SelectMultipleItems()

AddItems

Adds items to the document based on the provided selection filter.

procedure AddItems(SelectionFilter: Text)

Parameters

Name Type Description
SelectionFilter Text

The filter to use for selecting items.

AddItem

Adds an item to the document.

procedure AddItem(var SalesLine: Record "Sales Line"; ItemNo: Code[20])

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

Return value: The added sales line. Sales line must have the document type and number set.

ItemNo Code[20]

Return value: The number of the item to add.

Remarks

After the line is added, assembly order is automatically created if required. If the item has extended text, the text is added as a line.

ProcessSalesLine

Creates or updates assembly orders if assemble-to-order is required. Creates extended text lines applicable to the provided sales line.

procedure ProcessSalesLine(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line to process.

InitNewLine

Initializes a new sales line based on the current sales line.

procedure InitNewLine(var NewSalesLine: Record "Sales Line")

Parameters

Name Type Description
NewSalesLine Table Microsoft.Sales.Document."Sales Line"

Return value: The new sales line.

ShowItemSub

Opens a page for looking up item substitutions for the current item on the sales line. If substitution is selected, the item is replaced with the selected item.

procedure ShowItemSub()

Remarks

If item is substituted, it also adds any extended text for the new item.

ShowNonstock

Opens a page for selecting a nonstock item to add to the document. If a nonstock item is selected, it is added to the document and the unit price is updated.

procedure ShowNonstock()

GetFAPostingGroup

Sets tax and posting groups codes for a fixed asset sales line.

procedure GetFAPostingGroup()

GetCaptionClass

Gets a caption class for a field.

procedure GetCaptionClass(FieldNumber: Integer): Text[80]

Parameters

Name Type Description
FieldNumber Integer

The number of the field to get the caption class for.

Returns

Type Description
Text[80]

The caption class of a field.

GetSKU

Gets a stockkeeping unit for the current sales line and saves it in a global variable SKU.

procedure GetSKU(): Boolean

Returns

Type Description
Boolean

True if a stockkeeping unit was found, otherwise, false.

GetSKU

Gets a stockkeeping unit for the current sales line.

procedure GetSKU(var StockkeepingUnit: Record "Stockkeeping Unit"): Boolean

Parameters

Name Type Description
StockkeepingUnit Table Microsoft.Inventory.Location."Stockkeeping Unit"

Return value: The stockkeeping unit for the current sales line.

Returns

Type Description
Boolean

True if a stockkeeping unit was found, otherwise, false.

GetUnitCost

Finds and assigns the unit cost for the item specified on the sales line.

procedure GetUnitCost()

ShowItemChargeAssgnt

Opens a page for editing item charge assignment for the item charge sales line. If assignments don't exist for the item charge, new assignments are created and committed before opening the page.

procedure ShowItemChargeAssgnt()

UpdateItemChargeAssgnt

Updates amounts on item charge assignments for the current sales line.

procedure UpdateItemChargeAssgnt()

DeleteItemChargeAssignment

Deletes item charge assignments applied to a sales document line.

procedure DeleteItemChargeAssignment(DocType: Enum "Sales Document Type"; DocNo: Code[20]; DocLineNo: Integer)

Parameters

Name Type Description
DocType Enum Microsoft.Sales.Document."Sales Document Type"

Document type of the applied-to document.

DocNo Code[20]

Document number of the applied-to document.

DocLineNo Integer

Line number of the applied-to document.

TestStatusOpen

Tests if sales header of the line is open.

procedure TestStatusOpen()

Remarks

Check is executed only for non-system created lines, type changes, and lines with non-blank type.

GetSuspendedStatusCheck

Returns the value of the global variable StatusCheckSuspended.

procedure GetSuspendedStatusCheck(): Boolean

Returns

Type Description
Boolean

The value of the global variable StatusCheckSuspended.

SuspendStatusCheck

Sets the value of the global variable StatusCheckSuspended.

procedure SuspendStatusCheck(Suspend: Boolean)

Parameters

Name Type Description
Suspend Boolean

The new value to set.

Remarks

Suspends several checks like testing for status open on sales header, sales line check on shipment date validate, and amount updates on delete.

SwitchLinesWithErrorsFilter

Toggles the filter for lines with errors between displaying all lines and only lines with errors.

procedure SwitchLinesWithErrorsFilter(var ShowAllLinesEnabled: Boolean)

Parameters

Name Type Description
ShowAllLinesEnabled Boolean

Return value: A toggle for showing all lines or just lines with errors. After switching the filter, the toggle is returned with the opposite value.

UpdateVATOnLines

Recalculates and updates line and VAT amounts on all lines of the document.

procedure UpdateVATOnLines(QtyType: Option; var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"): Boolean

Parameters

Name Type Description
QtyType Option

The type of quantity to consider for the update (Qty, QtyToInvoice, QtyToShip).

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The sales header of the document. The sales lines are filtered for this document.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line record set that is looped through. Pre-existing filters will narrow down the lines to consider.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

VAT amount line record set used in VAT calculations. The line used is retrieved from this set for each sales line.

Returns

Type Description
Boolean

True if any line was modified; otherwise, false.

Remarks

QtyType::Shipping exits the function without updating the lines. QtyType::Invoicing doesn't update line and VAT amounts, only invoice discount amount to invoice and VAT difference.

CalcVATAmountLines

Creates VAT amount lines for all applicable sales lines in the document. An overload that sets IncludePrepayments to true.

procedure CalcVATAmountLines(QtyType: Option; var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line")

Parameters

Name Type Description
QtyType Option

The type of quantity to consider for the calculation (Qty, QtyToInvoice, QtyToShip).

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The sales header of the document. The sales lines are filtered for this document.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line record set that is looped through. Pre-existing filters will narrow down the lines to consider.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

Return value: VAT amount line set where records are inserted. This must be a temporary variable as DeleteAll is called on it.

Remarks

VATAmountLine parameter must be temporary as DeleteAll is called on it.

CalcVATAmountLines

Creates VAT amount lines for all applicable sales lines in the document.

procedure CalcVATAmountLines(QtyType: Option; var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; IncludePrepayments: Boolean)

Parameters

Name Type Description
QtyType Option

The type of quantity to consider for the calculation (Qty, QtyToInvoice, QtyToShip).

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The sales header of the document. The sales lines are filtered for this document.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line record set that is looped through. Pre-existing filters will narrow down the lines to consider.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

Return value: VAT amount line set where records are inserted. This must be a temporary variable as DeleteAll is called on it.

IncludePrepayments Boolean

A flag indicating whether amount used in calculation should include prepayment amount

Remarks

VATAmountLine parameter must be temporary as DeleteAll is called on it. IncludePrepayments is only applicable to Invoicing and Shipping QtyTypes.

GetCPGInvRoundAcc

Gets the account number to use for invoice rounding from the customer posting group. If invoice rounding is disabled, returns blank

procedure GetCPGInvRoundAcc(var SalesHeader: Record "Sales Header"): Code[20]

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The sales header of the document.

Returns

Type Description
Code[20]

The invoice rounding account number

GetVATAmountLineOfMaxAmt

Gets the VAT amount line for the sales line with the maximum absolute amount from the VAT amount line set.

procedure GetVATAmountLineOfMaxAmt(var VATAmountLine: Record "VAT Amount Line"; SalesLine: Record "Sales Line"): Boolean

Parameters

Name Type Description
VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

Return value: The VAT amount line with the maximum absolute amount. The search is performed on the record set passed in this parameter.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line record to filter the VAT amount line set.

Returns

Type Description
Boolean

True if a VAT amount line was found, otherwise, false.

CalcInvDiscToInvoice

Updates the invoice discount amount to invoice based on the current quantity and quantity to invoice.

procedure CalcInvDiscToInvoice()

UpdateWithWarehouseShip

Updates the quantities to ship or receive based on the document type, quantity, and location/warehouse requirements.

procedure UpdateWithWarehouseShip()

Remarks

If the default quantity to ship in sales setup is set to blank, the quantity to ship, recieve and invoice are always set to zero.

CheckWarehouse

Checks that the warehouse requirements for the sales line, such as shipment, pick, receive, and put-away are met based on the location and document type.

procedure CheckWarehouse(ShowDialogMessage: Boolean)

Parameters

Name Type Description
ShowDialogMessage Boolean

Determines whether to show a dialog message if the warehouse requirements are not met.

Remarks

If a dialog message is shown, it will either be a message or an error depending on the warehouse requirements and the document type.

CheckWarehouseForQtyToShip

Checks the warehouse requirements for the quantity to be shipped.

procedure CheckWarehouseForQtyToShip()

UpdateDates

Updates the shipment and delivery dates for the sales line.

procedure UpdateDates()

GetItemTranslation

Retrieves the item translation for the language of the document and updates the descriptions on the sales line.

procedure GetItemTranslation()

PriceExists

Returns true if any price list line with price or cost that fit the sales line exist. This is an overload that sets ShowAll to true.

procedure PriceExists(): Boolean

Returns

Type Description
Boolean

True if any price list line is found, otherwise false.

LineDiscExists

Returns true if any price list line with discount that fit the sales line exist. This is an overload that sets ShowAll to true.

procedure LineDiscExists(): Boolean

Returns

Type Description
Boolean

True if any price list line is found, otherwise false.

RowID1

Creates a unique row identifier for the sales line used for item tracking.

procedure RowID1(): Text[250]

Returns

Type Description
Text[250]

The unique row identifier.

GetDefaultBin

Gets the default bin for the sales line item based on the requriments of the location.

procedure GetDefaultBin()

GetATOBin

Retrieves the Assembly-to-Order (ATO) bin for a given location.

procedure GetATOBin(Location: Record Location; var BinCode: Code[20]): Boolean

Parameters

Name Type Description
Location Table Microsoft.Inventory.Location.Location

The location record to retrieve the ATO bin for.

BinCode Code[20]

Return value: The ATO bin code.

Returns

Type Description
Boolean

True if the ATO bin was found, otherwise false.

IsInbound

Determines if the sales document this line belongs to is an inbound document.

procedure IsInbound(): Boolean

Returns

Type Description
Boolean

True if the document is inbound, otherwise false.

CheckAssocPurchOrder

Raises an error if the sales line is associated with a purchase order to ensure no changes are made to the line.

procedure CheckAssocPurchOrder(TheFieldCaption: Text[250])

Parameters

Name Type Description
TheFieldCaption Text[250]

The caption of the field that is being changed. Used to determine if the check is executed for a field change or a line deletion.

CheckServItemCreation

Ensures that items that create a service item are not shipped in fractional quantities.

procedure CheckServItemCreation()

ItemExists

Determines if the provided item number exists.

procedure ItemExists(ItemNo: Code[20]): Boolean

Parameters

Name Type Description
ItemNo Code[20]

Item number to check.

Returns

Type Description
Boolean

True if the item exists, otherwise false.

Remarks

If the line type is not item, the function returns true.

FindOrCreateRecordByNo

Finds or creates a record by a given number and returns the number of the found

procedure FindOrCreateRecordByNo(SourceNo: Code[20]): Code[20]

Parameters

Name Type Description
SourceNo Code[20]

A record number to find.

Returns

Type Description
Code[20]

Number of the found record.

IsShipment

Determines if the sales line represents a shipment.

procedure IsShipment(): Boolean

Returns

Type Description
Boolean

True if the line represents a shipment, otherwise false.

GetAbsMin

Retrieves the absolute minimum between the quantity to handle and the quantity handled.

procedure GetAbsMin(QtyToHandle: Decimal; QtyHandled: Decimal): Decimal

Parameters

Name Type Description
QtyToHandle Decimal

The quantity to handle.

QtyHandled Decimal

The quantity handled.

Returns

Type Description
Decimal

The absolute minimum quantity.

SetHideValidationDialog

Sets the global HideValidationDialog flag.

procedure SetHideValidationDialog(NewHideValidationDialog: Boolean)

Parameters

Name Type Description
NewHideValidationDialog Boolean

The new value of the flag.

Remarks

The flag is unused in the object.

GetHideValidationDialog

Gets the global HideValidationDialog flag.

procedure GetHideValidationDialog(): Boolean

Returns

Type Description
Boolean

The value of the flag.

CalcPrepaymentToDeduct

Updates the prepayment amount to deduct with the next posting.

procedure CalcPrepaymentToDeduct()

IsFinalInvoice

Determines if the line will be fully invoiced after posting.

procedure IsFinalInvoice(): Boolean

Returns

Type Description
Boolean

True if the line will be fully invoiced, otherwise false.

GetLineAmountToHandle

Calculates the net line amount for the specified quantity to handle.

procedure GetLineAmountToHandle(QtyToHandle: Decimal): Decimal

Parameters

Name Type Description
QtyToHandle Decimal

The quantity to handle.

Returns

Type Description
Decimal

The net line amount.

GetLineAmountToHandleInclPrepmt

Calculates the net line amount for the specified quantity to handle. If line must be fully prepaid then the line amount is calculated with the prepayment amount to deduct.

procedure GetLineAmountToHandleInclPrepmt(QtyToHandle: Decimal): Decimal

Parameters

Name Type Description
QtyToHandle Decimal

The quantity to handle.

Returns

Type Description
Decimal

The net line amount.

GetLineAmountExclVAT

Calculates the line amount excluding VAT.

procedure GetLineAmountExclVAT(): Decimal

Returns

Type Description
Decimal

The line amount excluding VAT.

GetLineAmountInclVAT

Calculates the line amount including VAT.

procedure GetLineAmountInclVAT(): Decimal

Returns

Type Description
Decimal

The line amount including VAT.

SetHasBeenShown

Sets a flag to prevent showing a message if shipment date is before work date.

procedure SetHasBeenShown()

TestJobPlanningLine

Ensures that a sales line that is associated with a job task has not been changed.

procedure TestJobPlanningLine()

BlockDynamicTracking

Sets the blocking state for dynamic tracking of reservations on quantity change.

procedure BlockDynamicTracking(SetBlock: Boolean)

Parameters

Name Type Description
SetBlock Boolean

The new blocking state.

InitQtyToShip2

Initializes the quantity to ship and invoice to reflect changes after the sales line has been (partially) posted. Additionally, reclaculates the proportional invoice discount and prepayment amounts for next posting.

procedure InitQtyToShip2()

ShowLineComments

Opens a page to show comments for the sales line.

procedure ShowLineComments()

SetDefaultQuantity

Resets quantities to ship/return and invoice to zero based on the sales setup setting for default shipping quantity.

procedure SetDefaultQuantity()

SetReserveToOptional

Changes the reservation setting from Never to Optional and saves the record.

procedure SetReserveToOptional()

UpdatePrePaymentAmounts

Recalculates prepayment amounts to reflect changes in quantity.

procedure UpdatePrePaymentAmounts()

ZeroAmountLine

Determines if the line has a zero amount. It always returns true for a line with a blank type.

procedure ZeroAmountLine(QtyType: Option): Boolean

Parameters

Name Type Description
QtyType Option

The type of quantity to check. Only Invoicing option makes a difference by checking if quantity to invoice is zero, other options are ignored.

Returns

Type Description
Boolean

True if the line has a zero amount, otherwise false.

FilterLinesWithItemToPlan

Sets filters on the sales line for item lines, a specified document type, and various flow filters set in the provided item record.

procedure FilterLinesWithItemToPlan(var Item: Record Item; DocumentType: Enum "Sales Document Type")

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item

Item record to filter the sales lines with.

DocumentType Enum Microsoft.Sales.Document."Sales Document Type"

The document type to filter the sales lines with.

FindLinesWithItemToPlan

Retrieves a record set of item sales lines that match the provided document type and various filters set on the item.

procedure FindLinesWithItemToPlan(var Item: Record Item; DocumentType: Enum "Sales Document Type"): Boolean

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item

Item record to filter the sales lines with.

DocumentType Enum Microsoft.Sales.Document."Sales Document Type"

The document type to filter the sales lines with.

Returns

Type Description
Boolean

True if any sales line was found, otherwise false.

LinesWithItemToPlanExist

Determines if any sales lines exist that match the provided document type and various flow filters set on the item.

procedure LinesWithItemToPlanExist(var Item: Record Item; DocumentType: Enum "Sales Document Type"): Boolean

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item

Item record to filter the sales lines with.

DocumentType Enum Microsoft.Sales.Document."Sales Document Type"

The document type to filter the sales lines with.

Returns

Type Description
Boolean

True if any sales lines exist, otherwise false.

FilterLinesForReservation

Sets filters on the sales line for item lines that match the provided reservation entry.

procedure FilterLinesForReservation(ReservationEntry: Record "Reservation Entry"; DocumentType: Enum "Sales Document Type"; AvailabilityFilter: Text; Positive: Boolean)

Parameters

Name Type Description
ReservationEntry Table Microsoft.Inventory.Tracking."Reservation Entry"

Reservation entry to filter the sales lines with.

DocumentType Enum Microsoft.Sales.Document."Sales Document Type"

The document type to filter the sales lines with.

AvailabilityFilter Text

Date filter to apply to the shipment date field.

Positive Boolean

A flag to determine if the quantity filter should be positive or negative.

InitQtyToAsm

Initializes quantities to assemble to order for the sales line.

procedure InitQtyToAsm()

AsmToOrderExists

Determines if assembly order exists for the sales line and retrieves the assembly header.

procedure AsmToOrderExists(var AsmHeader: Record "Assembly Header"): Boolean

Parameters

Name Type Description
AsmHeader Table Microsoft.Assembly.Document."Assembly Header"

Return value: The assembly header record asociated with the sales line.

Returns

Type Description
Boolean

True if the assembly order exists, otherwise false.

FullQtyIsForAsmToOrder

Determines if the full quantity is for assembly to order.

procedure FullQtyIsForAsmToOrder(): Boolean

Returns

Type Description
Boolean

True if the full quantity is for assembly to order, otherwise false.

QtyBaseOnATO

Returns the quantity (base) from the associated assembly order, if it doesn't exist, returns zero.

procedure QtyBaseOnATO(): Decimal

Returns

Type Description
Decimal

The quantity (base) from the associated assembly order or zero.

QtyAsmRemainingBaseOnATO

Returns the remaining quantity (base) from the associated assembly order, if it doesn't exist, returns zero.

procedure QtyAsmRemainingBaseOnATO(): Decimal

Returns

Type Description
Decimal

The remaining quantity (base) from the associated assembly order or zero.

QtyToAsmBaseOnATO

Returns the quantity to assemble (base) from the associated assembly order, if it doesn't exist, returns zero.

procedure QtyToAsmBaseOnATO(): Decimal

Returns

Type Description
Decimal

The quantity to assemble (base) from the associated assembly order or zero.

IsAsmToOrderAllowed

Determines if the sales line is allowed to be assembled to order.

procedure IsAsmToOrderAllowed(): Boolean

Returns

Type Description
Boolean

True if the sales line is allowed to be assembled to order, otherwise false.

IsAsmToOrderRequired

Determines if the sales line is required to be assembled to order.

procedure IsAsmToOrderRequired(): Boolean

Returns

Type Description
Boolean

True if the sales line is required to be assembled to order, otherwise false.

CheckAsmToOrder

Checks that sales line fields match the provided assembly order.

procedure CheckAsmToOrder(AsmHeader: Record "Assembly Header")

Parameters

Name Type Description
AsmHeader Table Microsoft.Assembly.Document."Assembly Header"

The assembly header to check value against.

ShowAsmToOrderLines

Opens a page with assembly lines for the document of the sales line. The page is only opened if any lines exist.

procedure ShowAsmToOrderLines()

FindOpenATOEntry

Finds the first open item ledger entry number for posted assembly that matches the sales line and the provided item tracking setup.

procedure FindOpenATOEntry(ItemTrackingSetup: Record "Item Tracking Setup"): Integer

Parameters

Name Type Description
ItemTrackingSetup Table Microsoft.Inventory.Tracking."Item Tracking Setup"

The item tracking setup to filter the item ledger entry with.

Returns

Type Description
Integer

The item ledger entry no. if found, otherwise zero.

RollUpAsmCost

Sums up costs from assembly components and updates the unit cost on the sales line.

procedure RollUpAsmCost()

RollupAsmPrice

Sums up prices from assembly components and updates the unit price on the sales line.

procedure RollupAsmPrice()

UpdateICPartner

Updates the intercompany partner information on the sales line for outgoing intercompany documents.

procedure UpdateICPartner()

OutstandingInvoiceAmountFromShipment

Calculates the outstanding invoice amount from shipments for a specified customer.

procedure OutstandingInvoiceAmountFromShipment(SellToCustomerNo: Code[20]): Decimal

Parameters

Name Type Description
SellToCustomerNo Code[20]

The sell-to customer number to calculate the outstanding invoice amount for.

Returns

Type Description
Decimal

The outstanding invoice amount.

CheckShipmentDateBeforeWorkDate

Checks if the shipment date is before the work date and shows a warning message if applicable.

procedure CheckShipmentDateBeforeWorkDate()

VerifyItemLineDim

Checks if dimensions have changed on an already shipped or received item line and prompts the user to confirm the change.

procedure VerifyItemLineDim()

IsShippedReceivedItemDimChanged

Determines if the dimensions have changed on an already shipped or received item line.

procedure IsShippedReceivedItemDimChanged(): Boolean

Returns

Type Description
Boolean

True if the dimensions have changed, otherwise false.

IsServiceChargeLine

Determines if the line is a service charge line.

procedure IsServiceChargeLine(): Boolean

Returns

Type Description
Boolean

True if the line is a service charge line, otherwise false.

ConfirmShippedReceivedItemDimChange

Raises a confirmation dialog to confirm the change of dimensions on an already shipped or received item line.

procedure ConfirmShippedReceivedItemDimChange(): Boolean

Returns

Type Description
Boolean

True if the user confirms the change, otherwise an error is thrown.

InitType

Initializes the type of a new sales line.

procedure InitType()

Remarks

It keeps the type of the previous line, unless the document is released and the line type is item or fixed asset. In that case, the type is reset to blank.

GetDefaultLineType

Gets the default line type from the sales setup if it is set.

procedure GetDefaultLineType(): Enum "Sales Line Type"

Returns

Type Description
Enum Microsoft.Sales.Document."Sales Line Type"

The default line type from the sales setup, otherwise blank.

CheckLocationOnWMS

Checks if shipment or receipt is required for item sales line and throws an error if it's missing.

procedure CheckLocationOnWMS()

IsNonInventoriableItem

Determines if the line is a non-inventoriable item line.

procedure IsNonInventoriableItem(): Boolean

Returns

Type Description
Boolean

True if the line is a non-inventoriable item line, otherwise false.

IsInventoriableItem

Determines if the line is an inventoriable item line.

procedure IsInventoriableItem(): Boolean

Returns

Type Description
Boolean

True if the line is an inventoriable item line, otherwise false.

IsExtendedText

Determines if the line is an extended text line.

procedure IsExtendedText(): Boolean

Returns

Type Description
Boolean

True if the line is an extended text line, otherwise false.

GetJnlTemplateName

Gets the journal template name to use when posting the document if the template name is mandatory for posting.

procedure GetJnlTemplateName(): Code[10]

Returns

Type Description
Code[10]

The journal template name for the document if it is mandatory, otherwise blank.

ValidateReturnReasonCode

Updates the cost, price and location for return order line.

procedure ValidateReturnReasonCode(CallingFieldNo: Integer)

Parameters

Name Type Description
CallingFieldNo Integer

The field number that initiated the update.

Remarks

if CallingFieldNo is 0, no updates occur.

ValidateLineDiscountPercent

Recalculates line discount amount and updates other line amounts. Additionally, if specified, removes the invoice discount amount from the line and reduces the invoice discount on the header for the same amount.

procedure ValidateLineDiscountPercent(DropInvoiceDiscountAmount: Boolean)

Parameters

Name Type Description
DropInvoiceDiscountAmount Boolean

True if the invoice discount amount should be removed from the line and reduced on the header, otherwise false.

ExcludeDefaultItemQuantity

procedure ExcludeDefaultItemQuantity(DefaultItemQuantity: Boolean)

Parameters

Name Type Description
DefaultItemQuantity Boolean

HasTypeToFillMandatoryFields

Determines if mandatory fields have to be filled in for the line based on the line type. By default, only empty type is not considered mandatory, but can be overridden by the event.

procedure HasTypeToFillMandatoryFields(): Boolean

Returns

Type Description
Boolean

True if mandatory fields have to be filled in, otherwise false.

GetDeferralAmount

Gets the defferal amount for the sales line to be used in deferral schedules.

procedure GetDeferralAmount(): Decimal

Returns

Type Description
Decimal

The deferral amount.

UpdateDeferralAmounts

Removes or updates the deferral schedule for the sales line to reflect changes in the deferral amount and posting date.

procedure UpdateDeferralAmounts()

UpdatePriceDescription

Formats the price description for the sales line based on the line type and line discount.

procedure UpdatePriceDescription()

Remarks

This procedure is only used in Microsoft Invoicing objects which have been discontinoued and will be removed in a future version.

ShowDeferrals

Opens a page with deferral schedule for the sales line.

procedure ShowDeferrals(PostingDate: Date; CurrencyCode: Code[10]): Boolean

Parameters

Name Type Description
PostingDate Date

Posting date to calculate the schedule from if a new deferral schedule is created.

CurrencyCode Code[10]

Currency code to use for a new deferral schedule.

Returns

Type Description
Boolean

True if deferral schedule was changed, otherwise false.

Remarks

If the deferral schedule doesn't exist yet, a new one is created and commited before the page is opened.

InitHeaderDefaults

Initializes the default values for the sales line based on the sales header.

procedure InitHeaderDefaults(SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The sales header to initialize the default values from.

DefaultDeferralCode

Updates the deferral code to the default deferral template code specified on the associated item, resource or g/l account.

procedure DefaultDeferralCode()

Remarks

The deferral code is not set for lines of blanket orders and quotes.

IsCreditDocType

Determines if the document type of the line is a credit document type.

procedure IsCreditDocType(): Boolean

Returns

Type Description
Boolean

True if the document type is a credit document type, otherwise false.

CanEditUnitOfMeasureCode

Determines if item unit of measure code can be edited.

procedure CanEditUnitOfMeasureCode(): Boolean

Returns

Type Description
Boolean

True if item unit of measure code can be edited, otherwise false.

Remarks

If this is not an item line or if item is not selected the procedure always return true.

InsertFreightLine

Creates or updates a sales line for freight for a specified freight amount.

procedure InsertFreightLine(var FreightAmount: Decimal)

Parameters

Name Type Description
FreightAmount Decimal

The new unit price of created or updated line.

Remarks

If the freight amount is negative, it's set to 0 and no line is created or updated. The current sales line does not point to the freight line after the procedure is executed.

IsLookupRequested

Determines if additional lookup for item description is required. Used for integration purposes when the default item description lookup is not sufficient.

procedure IsLookupRequested(): Boolean

Returns

Type Description
Boolean

True if additional lookup for item description is required, otherwise false.

Remarks

This is currently only used in Microsoft Invoicing functionality which has been discontinued and will be removed in a future version.

TestItemFields

Verifies that item related fields on the item sales line match the provided values. If the values do not match, an error is thrown.

procedure TestItemFields(ItemNo: Code[20]; VariantCode: Code[10]; LocationCode: Code[10])

Parameters

Name Type Description
ItemNo Code[20]

The item number to verify.

VariantCode Code[10]

The variant code to verify.

LocationCode Code[10]

The location code to verify.

CalculateNotShippedInvExlcVatLCY

Calculates and sets the shipped not invoiced amount excluding VAT in LCY.

procedure CalculateNotShippedInvExlcVatLCY()

ClearSalesHeader

Resets the global SalesHeader variable.

procedure ClearSalesHeader()

SendBlockedItemNotification

Sends a notification to the user that the item on this line is blocked.

procedure SendBlockedItemNotification()

SendLineInvoiceDiscountResetNotification

Sends a notification if the line invoice discount amount is reset.

procedure SendLineInvoiceDiscountResetNotification()

GetDocumentTypeDescription

Gets the text representation of the document type for the sales line.

procedure GetDocumentTypeDescription(): Text

Returns

Type Description
Text

The text representation of the document type.

FormatType

Gets the text representation of the line type for the sales line.

procedure FormatType(): Text[20]

Returns

Type Description
Text[20]

The text representation of the line type.

Remarks

Blank line type is represented by the comment label.

RenameNo

Renames all sales lines for the specified line type and number to a new number. Used when related entities are renamed.

procedure RenameNo(LineType: Enum "Sales Line Type"; OldNo: Code[20]; NewNo: Code[20])

Parameters

Name Type Description
LineType Enum Microsoft.Sales.Document."Sales Line Type"

The line type of lines to rename.

OldNo Code[20]

The old number to rename from.

NewNo Code[20]

The new number to rename to.

UpdatePlanned

Updates the 'planned' status of a sales line, depending if all the outstanding quantity is reserved or not.

procedure UpdatePlanned(): Boolean

Returns

Type Description
Boolean

True if the 'planned' status was updated, otherwise false.

AssignedItemCharge

Determines if the line is a charge item line that has been at least partially assigned.

procedure AssignedItemCharge(): Boolean

Returns

Type Description
Boolean

True if the line is a charge item line that has been at least partially assigned, otherwise false.

UpdateBaseAmounts

Updates the base amount fields on the sales line.

procedure UpdateBaseAmounts(NewAmount: Decimal; NewAmountIncludingVAT: Decimal; NewVATBaseAmount: Decimal)

Parameters

Name Type Description
NewAmount Decimal

The new Amount value.

NewAmountIncludingVAT Decimal

The new Amount Including VAT value.

NewVATBaseAmount Decimal

The new VAT Base Amount value.

CalcPlannedDate

Calculates the planned delivery if shippment time is specified, otherwise the planned shipment date.

procedure CalcPlannedDate(): Date

Returns

Type Description
Date

The calculated planned delivery date or planned shipment date.

ValidateUnitCostLCYOnGetUnitCost

Updates the unit cost in LCY based on the quantity per unit of measure and unit cost from either the item or it's SKU.

procedure ValidateUnitCostLCYOnGetUnitCost(Item: Record Item)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item

The item record to update the unit cost from.

CheckPromisedDeliveryDate

Throws an error if requested delivery date was changed after the promised delivery date is set.

procedure CheckPromisedDeliveryDate()

ShowBlanketOrderSalesLines

Open a page with the sales lines related to the blanket order line.

procedure ShowBlanketOrderSalesLines(DocumentType: Enum "Sales Document Type")

Parameters

Name Type Description
DocumentType Enum Microsoft.Sales.Document."Sales Document Type"

The document type of the sales lines to show.

ShowBlanketOrderPostedShipmentLines

Open a page with the posted sales shipment lines related to the blanket order line.

procedure ShowBlanketOrderPostedShipmentLines()

ShowBlanketOrderPostedInvoiceLines

Open a page with the posted sales invoice lines related to the blanket order line.

procedure ShowBlanketOrderPostedInvoiceLines()

ShowBlanketOrderPostedReturnReceiptLines

Open a page with the posted return receipt lines related to the blanket order line.

procedure ShowBlanketOrderPostedReturnReceiptLines()

ShowBlanketOrderPostedCreditMemoLines

Open a page with the posted sales credit memo lines related to the blanket order line.

procedure ShowBlanketOrderPostedCreditMemoLines()

ShowDeferralSchedule

Opens a page with deferral schedule for the sales line.

procedure ShowDeferralSchedule()

Remarks

If the deferral schedule doesn't exist yet, a new one is created and commited before the page is opened. The posting date and currency code for the new schedule are taken from the sales header.

CalcBaseQty

Converts the specified quantity to the quantity in the base unit of measure.

procedure CalcBaseQty(Qty: Decimal; FromFieldName: Text; ToFieldName: Text): Decimal

Parameters

Name Type Description
Qty Decimal

The quantity to convert.

FromFieldName Text

Caption of the field containing the quantity to convert.

ToFieldName Text

Caption of the field containing the converted quantity.

Returns

Type Description
Decimal

The quantity in the base unit of measure.

CreateDimFromDefaultDim

Initializes the dimensions for the sales line if default dimensions are defined for the specified field.

procedure CreateDimFromDefaultDim(FieldNo: Integer)

Parameters

Name Type Description
FieldNo Integer

The field number for which to initialize the dimensions.

InitDefaultDimensionSources

Collects default dimension sources for the sales line with the dimension source for the specified field added in the first place.

procedure InitDefaultDimensionSources(var DefaultDimSource: List of [Dictionary of [Integer, Code[20]]]; FieldNo: Integer)

Parameters

Name Type Description
DefaultDimSource List of [Dictionary of [Integer, Code[20]]]

Return value: The list of default dimension sources.

FieldNo Integer

The field number for which to initialize the dimensions.

InitDefaultDimensionSources

Collects default dimension sources for the sales line.

procedure InitDefaultDimensionSources(var DefaultDimSource: List of [Dictionary of [Integer, Code[20]]]; JobNo: Code[20]; FieldNo: Integer)

Parameters

Name Type Description
DefaultDimSource List of [Dictionary of [Integer, Code[20]]]

Return value: The list of default dimension sources.

JobNo Code[20]

The job number to add to the dimension sources.

FieldNo Integer

The field number for which to initialize the dimensions.

Remarks

The FieldNo is only used on the event publisher.

SaveLookupSelection

Saves the selected record from the lookup to the lookup state manager.

procedure SaveLookupSelection(SelectedRecordRef: RecordRef)

Parameters

Name Type Description
SelectedRecordRef RecordRef

The reference to the selected record from the lookup.

AttachToInventoryItemLine

Opens a page with inventory item lines and attaches the selected line to all non-inventoriable sales lines in the passed SelectedSalesLine record set.

procedure AttachToInventoryItemLine(var SelectedSalesLine: Record "Sales Line")

Parameters

Name Type Description
SelectedSalesLine Table Microsoft.Sales.Document."Sales Line"

The record set of sales lines to attach the inventory item line to.

RestoreLookupSelection

Restores the selected record from the lookup state manager to the sales line.

procedure RestoreLookupSelection()

GetDateForCalculations

Gets the date to use in calculations for the sales line. Used in finding item references and price calculations.

procedure GetDateForCalculations(): Date

Returns

Type Description
Date

The date for calculations.

GetDateForCalculations

Gets the date to use in calculations for the sales line. Used in finding item references and price calculations.

procedure GetDateForCalculations(FromSalesHeader: Record "Sales Header"): Date

Parameters

Name Type Description
FromSalesHeader Table Microsoft.Sales.Document."Sales Header"

The sales header to get the date from.

Returns

Type Description
Date

The date for calculations.

GetShippingTime

Updates the shipping time on the sales line.

procedure GetShippingTime()

CheckIfSalesLineMeetsReservedFromStockSetting

Determines if the reserved quantity on sales line meets the reserved from stock setting based on the quantity to post.

procedure CheckIfSalesLineMeetsReservedFromStockSetting(QtyToPost: Decimal; ReservedFromStock: Enum "Reservation From Stock"): Boolean

Parameters

Name Type Description
QtyToPost Decimal

The quantity to post.

ReservedFromStock Enum Microsoft.Inventory.Tracking."Reservation From Stock"

The reserved from stock setting.

Returns

Type Description
Boolean

True if the reserved quantity meets the reserved from stock setting, otherwise false.

CalcUnitPriceUsingUOMCoef

Calculates the unit price using the unit of measure coefficient from the related sales invoice line.

procedure CalcUnitPriceUsingUOMCoef()

GetVATPct

Gets the VAT percentage for this sales line.

procedure GetVATPct(): Decimal

Returns

Type Description
Decimal

The VAT percentage.

ReserveFromInventory

procedure ReserveFromInventory(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

Events

OnAfterInitDefaultDimensionSources

Raised after initializing default dimension sources on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterInitDefaultDimensionSources(var SalesLine: Record "Sales Line"; var DefaultDimSource: List of [Dictionary of [Integer, Code[20]]]; FieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

DefaultDimSource List of [Dictionary of [Integer, Code[20]]]

The list of default dimension sources.

FieldNo Integer

The field number that triggered the initialization.

OnAfterAssignFieldsForNo

Raised after assigning fields for the No. field on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterAssignFieldsForNo(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnAfterApplyPrice

Raised after applying price to the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterApplyPrice(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; CallFieldNo: Integer; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CallFieldNo Integer

The field number that initiated the price calculation.

CurrentFieldNo Integer

The current field number being processed.

OnAfterAssignHeaderValues

Raised after assigning header values to the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterAssignHeaderValues(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnAfterAssignStdTxtValues

Raised after assigning standard text values to the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterAssignStdTxtValues(var SalesLine: Record "Sales Line"; StandardText: Record "Standard Text"; SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

StandardText Table Microsoft.Utilities."Standard Text"

The standard text record.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnAfterAssignGLAccountValues

Raised after assigning G/L account values to the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterAssignGLAccountValues(var SalesLine: Record "Sales Line"; GLAccount: Record "G/L Account"; SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

GLAccount Table Microsoft.Finance.GeneralLedger.Account."G/L Account"

The G/L account record.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

TempSalesLine Table Microsoft.Sales.Document."Sales Line"

A temporary sales line record.

OnAfterAssignItemValues

Raised after assigning item values to the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterAssignItemValues(var SalesLine: Record "Sales Line"; Item: Record Item; SalesHeader: Record "Sales Header"; var xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Item Table Microsoft.Inventory.Item.Item

The item record.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number being processed.

OnAfterAssignItemChargeValues

Raised after assigning item charge values to the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterAssignItemChargeValues(var SalesLine: Record "Sales Line"; ItemCharge: Record "Item Charge"; SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

ItemCharge Table Microsoft.Inventory.Item."Item Charge"

The item charge record.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnAfterAssignResourceValues

Raised after assigning resource values to the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterAssignResourceValues(var SalesLine: Record "Sales Line"; Resource: Record Resource; SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Resource Table Microsoft.Projects.Resources.Resource.Resource

The resource record.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnAfterAssignFixedAssetValues

Raised after assigning fixed asset values to the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterAssignFixedAssetValues(var SalesLine: Record "Sales Line"; FixedAsset: Record "Fixed Asset"; SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

FixedAsset Table Microsoft.FixedAssets.FixedAsset."Fixed Asset"

The fixed asset record.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnAfterAssignItemUOM

Raised after assigning item unit of measure to the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterAssignItemUOM(var SalesLine: Record "Sales Line"; Item: Record Item; CurrentFieldNo: Integer; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Item Table Microsoft.Inventory.Item.Item

The item record.

CurrentFieldNo Integer

The current field number being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnAfterAssignResourceUOM

Raised after assigning resource unit of measure to the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterAssignResourceUOM(var SalesLine: Record "Sales Line"; Resource: Record Resource; ResourceUOM: Record "Resource Unit of Measure")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Resource Table Microsoft.Projects.Resources.Resource.Resource

The resource record.

ResourceUOM Table Microsoft.Projects.Resources.Resource."Resource Unit of Measure"

The resource unit of measure record.

OnAfterAutoReserve

Raised after auto-reserving inventory for the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterAutoReserve(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterCheckItemAvailable

Raised after checking item availability for the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterCheckItemAvailable(var SalesLine: Record "Sales Line"; CalledByFieldNo: Integer; HideValidationDialog: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CalledByFieldNo Integer

The field number that triggered the availability check.

HideValidationDialog Boolean

Specifies whether to hide the validation dialog.

OnAfterCheckShipmentRelation

Raised after checking the shipment relation for the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterCheckShipmentRelation(SalesLine: Record "Sales Line"; SalesShipmentLine: Record "Sales Shipment Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being checked.

SalesShipmentLine Table Microsoft.Sales.History."Sales Shipment Line"

The related sales shipment line.

OnAfterCheckRetRcptRelation

Raised after checking the return receipt relation for the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterCheckRetRcptRelation(SalesLine: Record "Sales Line"; ReturnReceiptLine: Record "Return Receipt Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being checked.

ReturnReceiptLine Table Microsoft.Sales.History."Return Receipt Line"

The related return receipt line.

OnAfterCreateDimFromDefaultDim

Raised after creating dimensions from default dimensions on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterCreateDimFromDefaultDim(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; CurrFieldNo: Integer; CallingFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

CurrFieldNo Integer

The current field number.

CallingFieldNo Integer

The field number that triggered the dimension creation.

OnAfterCopyFromItem

Raised after copying values from an item to the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterCopyFromItem(var SalesLine: Record "Sales Line"; Item: Record Item; CurrentFieldNo: Integer; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Item Table Microsoft.Inventory.Item.Item

The item record being copied from.

CurrentFieldNo Integer

The current field number being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnAfterCopyFromSalesLine

Raised after copying values from another sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterCopyFromSalesLine(var SalesLine: Record "Sales Line"; FromSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

FromSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being copied from.

OnAfterCopyFromSalesShptLine

Raised after copying values from a sales shipment line.

[IntegrationEvent(False,False)]
local procedure OnAfterCopyFromSalesShptLine(var SalesLine: Record "Sales Line"; FromSalesShipmentLine: Record "Sales Shipment Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

FromSalesShipmentLine Table Microsoft.Sales.History."Sales Shipment Line"

The sales shipment line being copied from.

OnAfterCopyUnitPriceAndLineDiscountPct

Raised after copying unit price and line discount percentage from a blanket order.

[IntegrationEvent(False,False)]
local procedure OnAfterCopyUnitPriceAndLineDiscountPct(var SalesLine: Record "Sales Line"; BlanketOrderSalesLine: Record "Sales Line"; CalledByFieldNo: Integer; SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

BlanketOrderSalesLine Table Microsoft.Sales.Document."Sales Line"

The blanket order sales line being copied from.

CalledByFieldNo Integer

The field number that triggered the copy.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnAfterDeleteChargeChargeAssgnt

Raised after deleting item charge assignments from the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterDeleteChargeChargeAssgnt(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number being processed.

OnAfterDeleteItemChargeAssignment

Raised after deleting an item charge assignment.

[IntegrationEvent(False,False)]
local procedure OnAfterDeleteItemChargeAssignment(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; DocType: Enum "Sales Document Type"; DocNo: Code[20]; DocLineNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number being processed.

DocType Enum Microsoft.Sales.Document."Sales Document Type"

The document type.

DocNo Code[20]

The document number.

DocLineNo Integer

The document line number.

OnAfterFilterLinesWithItemToPlan

Raised after filtering sales lines with items to plan.

[IntegrationEvent(False,False)]
local procedure OnAfterFilterLinesWithItemToPlan(var SalesLine: Record "Sales Line"; var Item: Record Item; DocumentType: Option)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line filter being applied.

Item Table Microsoft.Inventory.Item.Item

The item being planned.

DocumentType Option

The document type option.

OnAfterFilterLinesForReservation

Raised after filtering sales lines for reservation.

[IntegrationEvent(False,False)]
local procedure OnAfterFilterLinesForReservation(var SalesLine: Record "Sales Line"; ReservationEntry: Record "Reservation Entry"; DocumentType: Enum "Sales Document Type"; AvailabilityFilter: Text; Positive: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line filter being applied.

ReservationEntry Table Microsoft.Inventory.Tracking."Reservation Entry"

The reservation entry.

DocumentType Enum Microsoft.Sales.Document."Sales Document Type"

The document type.

AvailabilityFilter Text

The availability filter text.

Positive Boolean

Specifies whether to filter for positive entries.

OnAfterFindResUnitCost

Raised after finding the resource unit cost.

[IntegrationEvent(False,False)]
local procedure OnAfterFindResUnitCost(var SalesLine: Record "Sales Line"; var ResourceCost: Record "Resource Cost")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

ResourceCost Table Microsoft.Projects.Resources.Pricing."Resource Cost"

The resource cost record.

OnAfterGetFAPostingGroup

Raised after getting the fixed asset posting group.

[IntegrationEvent(False,False)]
local procedure OnAfterGetFAPostingGroup(var SalesLine: Record "Sales Line"; GLAccount: Record "G/L Account")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

GLAccount Table Microsoft.Finance.GeneralLedger.Account."G/L Account"

The G/L account record.

OnAfterGetVatBaseDiscountPct

Raised after getting the VAT base discount percentage.

[IntegrationEvent(False,False)]
local procedure OnAfterGetVatBaseDiscountPct(SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var Result: Decimal)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

Result Decimal

The calculated VAT base discount percentage.

OnAfterGetItemTranslation

Raised after getting the item translation for the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterGetItemTranslation(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; ItemTranslation: Record "Item Translation")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

ItemTranslation Table Microsoft.Inventory.Item."Item Translation"

The item translation record.

OnAfterGetSalesHeader

Raised after getting the sales header for the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterGetSalesHeader(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

OnAfterGetUnitCost

Raised after getting the unit cost for an item on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterGetUnitCost(var SalesLine: Record "Sales Line"; Item: Record Item)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Item Table Microsoft.Inventory.Item.Item

The item record.

OnAfterGetDefaultBin

Raised after getting the default bin for the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterGetDefaultBin(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterHasTypeToFillMandatoryFields

Raised after determining if the sales line has a type that requires filling mandatory fields.

[IntegrationEvent(False,False)]
local procedure OnAfterHasTypeToFillMandatoryFields(var SalesLine: Record "Sales Line"; var ReturnValue: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

ReturnValue Boolean

The result indicating whether mandatory fields must be filled.

OnAfterInitQtyToAsm

Raised after initializing the quantity to assemble on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterInitQtyToAsm(var SalesLine: Record "Sales Line"; CallingFieldNo: Integer; xSalesLine: Record "Sales Line"; ShouldUpdateQtyToAsm: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CallingFieldNo Integer

The field number that triggered the initialization.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

ShouldUpdateQtyToAsm Boolean

Specifies whether to update the quantity to assemble.

OnAfterGetSalesSetup

Raised after getting the sales and receivables setup.

[IntegrationEvent(False,False)]
local procedure OnAfterGetSalesSetup(var SalesLine: Record "Sales Line"; var SalesSetup: Record "Sales & Receivables Setup")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesSetup Table Microsoft.Sales.Setup."Sales & Receivables Setup"

The sales and receivables setup record.

OnAfterIsAsmToOrderAllowed

Raised after determining if assemble-to-order is allowed for the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterIsAsmToOrderAllowed(SalesLine: Record "Sales Line"; var Result: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Result Boolean

The result indicating whether assemble-to-order is allowed.

OnAfterIsCreditDocType

Raised after determining if the sales line is a credit document type.

[IntegrationEvent(False,False)]
local procedure OnAfterIsCreditDocType(SalesLine: Record "Sales Line"; var CreditDocType: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CreditDocType Boolean

The result indicating whether it is a credit document type.

OnAfterOpenItemTrackingLines

Raised after opening item tracking lines for the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterOpenItemTrackingLines(SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterPickDiscount

Raised after picking the discount during price calculation.

[IntegrationEvent(False,False)]
local procedure OnAfterPickDiscount(var SalesLine: Record "Sales Line"; var PriceCalculation: Interface "Price Calculation")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

PriceCalculation Interface Microsoft.Pricing.Calculation."Price Calculation"

The price calculation interface.

OnAfterPickPrice

Raised after picking the price during price calculation.

[IntegrationEvent(False,False)]
local procedure OnAfterPickPrice(var SalesLine: Record "Sales Line"; var PriceCalculation: Interface "Price Calculation")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

PriceCalculation Interface Microsoft.Pricing.Calculation."Price Calculation"

The price calculation interface.

OnAfterSetSalesHeader

Raised after setting the sales header on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterSetSalesHeader(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The sales header that was set.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

OnAfterShowNonStock

Raised after showing a nonstock item on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterShowNonStock(var SalesLine: Record "Sales Line"; NonstockItem: Record "Nonstock Item")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

NonstockItem Table Microsoft.Inventory.Item.Catalog."Nonstock Item"

The nonstock item record.

OnAfterShowItemChargeAssgnt

Raised after showing item charge assignment for the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterShowItemChargeAssgnt(var SalesLine: Record "Sales Line"; var ItemChargeAssignmentSales: Record "Item Charge Assignment (Sales)")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

ItemChargeAssignmentSales Table Microsoft.Sales.Document."Item Charge Assignment (Sales)"

The item charge assignment sales record.

OnAfterUpdateLineDiscPct

Raised after updating the line discount percentage on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateLineDiscPct(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterUpdatePrePaymentAmounts

Raised after updating prepayment amounts on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterUpdatePrePaymentAmounts(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterUpdateVATPercent

Raised after updating the VAT percent on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateVATPercent(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnUpdateUnitPriceByFieldOnBeforeValidateUnitPrice

Raised before validating the unit price when updating by field.

[IntegrationEvent(False,False)]
local procedure OnUpdateUnitPriceByFieldOnBeforeValidateUnitPrice(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CalledByFieldNo: Integer; CurrFieldNo: Integer; var Handled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CalledByFieldNo Integer

The field number that triggered the update.

CurrFieldNo Integer

The current field number.

Handled Boolean

Set to true to skip the default validation.

OnAfterUpdateUnitPrice

Raised after updating the unit price on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateUnitPrice(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CalledByFieldNo: Integer; CurrFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CalledByFieldNo Integer

The field number that triggered the update.

CurrFieldNo Integer

The current field number.

OnAfterAddItem

Raised after adding an item to the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterAddItem(var SalesLine: Record "Sales Line"; LastSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

LastSalesLine Table Microsoft.Sales.Document."Sales Line"

The last sales line before the addition.

OnBeforeAddItems

Raised before adding items to the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeAddItems(var SalesLine: Record "Sales Line"; SelectionFilter: Text; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SelectionFilter Text

The selection filter text.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeAutoReserve

Raised before auto-reserving inventory for the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeAutoReserve(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; FullAutoReservation: Boolean; var ReserveSalesLine: Codeunit "Sales Line-Reserve")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

FullAutoReservation Boolean

Specifies whether full auto reservation is requested.

ReserveSalesLine Codeunit Microsoft.Sales.Document."Sales Line-Reserve"

The sales line reserve codeunit.

OnBeforeCalcBaseQty

Raised before calculating the base quantity.

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcBaseQty(var SalesLine: Record "Sales Line"; Qty: Decimal; FromFieldName: Text; ToFieldName: Text)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Qty Decimal

The quantity to convert.

FromFieldName Text

The source field name.

ToFieldName Text

The target field name.

OnBeforeCalcInvDiscToInvoice

Raised before calculating the invoice discount to invoice.

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcInvDiscToInvoice(var SalesLine: Record "Sales Line"; CallingFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CallingFieldNo Integer

The field number that triggered the calculation.

OnBeforeCalcPlannedShptDate

Raised before calculating the planned shipment date.

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcPlannedShptDate(var SalesLine: Record "Sales Line"; var PlannedShipmentDate: Date; CallingFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

PlannedShipmentDate Date

The calculated planned shipment date.

CallingFieldNo Integer

The field number that triggered the calculation.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeCalcPrepmtToDeduct

Raised before calculating the prepayment to deduct.

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcPrepmtToDeduct(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeCalcVATAmountLines

Raised before calculating VAT amount lines.

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcVATAmountLines(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; var IsHandled: Boolean; QtyType: Option; IncludePrepayments: Boolean)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

IsHandled Boolean

Set to true to skip the default processing.

QtyType Option

The quantity type option.

IncludePrepayments Boolean

Specifies whether to include prepayments.

OnBeforeCallItemTracking

Raised before calling item tracking for the 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 being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeCheckAssocPurchOrder

Raised before checking the associated purchase order.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckAssocPurchOrder(var SalesLine: Record "Sales Line"; TheFieldCaption: Text[250]; var IsHandled: Boolean; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

TheFieldCaption Text[250]

The field caption being checked.

IsHandled Boolean

Set to true to skip the default processing.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnBeforeCheckAsmToOrder

Raised before checking the assemble-to-order configuration.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckAsmToOrder(var SalesLine: Record "Sales Line"; AsmHeader: Record "Assembly Header"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

AsmHeader Table Microsoft.Assembly.Document."Assembly Header"

The assembly header record.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeCheckPrepmtAmounts

Raised before checking prepayment amounts on the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckPrepmtAmounts(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; CurrFieldNo: Integer; SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrFieldNo Integer

The current field number.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnBeforeCheckApplFromItemLedgEntry

Raised before checking the application from item ledger entry.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckApplFromItemLedgEntry(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var ItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

ItemLedgerEntry Table Microsoft.Inventory.Ledger."Item Ledger Entry"

The item ledger entry to check.

IsHandled Boolean

Set to true to skip the default processing.

CurrentFieldNo Integer

The current field number.

OnBeforeCheckBinCodeRelation

Raised before checking the bin code relation.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckBinCodeRelation(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeCheckItemAvailable

Raised before checking item availability for the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckItemAvailable(var SalesLine: Record "Sales Line"; CalledByFieldNo: Integer; var IsHandled: Boolean; CurrentFieldNo: Integer; xSalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CalledByFieldNo Integer

The field number that triggered the check.

IsHandled Boolean

Set to true to skip the default processing.

CurrentFieldNo Integer

The current field number.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnBeforeCheckLinkedBlanketOrderLineOnDelete

Raised before checking linked blanket order line on delete.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckLinkedBlanketOrderLineOnDelete(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 processing.

OnBeforeCleanSpecialOrderFieldsAndCheckAssocPurchOrder

Raised before cleaning special order fields and checking the associated purchase order.

[IntegrationEvent(False,False)]
local procedure OnBeforeCleanSpecialOrderFieldsAndCheckAssocPurchOrder(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnBeforeCleanPurchaseLineSpecialOrderFields

Raised before cleaning purchase line special order fields.

[IntegrationEvent(False,False)]
local procedure OnBeforeCleanPurchaseLineSpecialOrderFields(SalesLine: Record "Sales Line"; var Result: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Result Boolean

The result of the operation.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeCopyFromItem

Raised before copying values from an item to the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeCopyFromItem(var SalesLine: Record "Sales Line"; Item: Record Item; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Item Table Microsoft.Inventory.Item.Item

The item record to copy from.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeFindNoByDescription

Raised before finding a record by description.

[IntegrationEvent(False,False)]
local procedure OnBeforeFindNoByDescription(SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var CurrentFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeFindOrCreateRecordByNo

Raised before finding or creating a record by number.

[IntegrationEvent(False,False)]
local procedure OnBeforeFindOrCreateRecordByNo(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeFormatType

Raised before formatting the line type.

[IntegrationEvent(False,False)]
local procedure OnBeforeFormatType(SalesLine: Record "Sales Line"; var FormattedType: Text[20]; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

FormattedType Text[20]

The formatted type text.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeGetCPGInvRoundAcc

Raised before getting the customer posting group invoice rounding account.

[IntegrationEvent(False,False)]
local procedure OnBeforeGetCPGInvRoundAcc(SalesHeader: Record "Sales Header"; Customer: Record Customer; var AccountNo: Code[20]; var IsHandled: Boolean)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

Customer Table Microsoft.Sales.Customer.Customer

The customer record.

AccountNo Code[20]

The account number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeGetAbsMin

Raised before getting the absolute minimum quantity.

[IntegrationEvent(False,False)]
local procedure OnBeforeGetAbsMin(SalesLine: Record "Sales Line"; QtyToHandle: Decimal; QtyHandled: Decimal; var Result: Decimal; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

QtyToHandle Decimal

The quantity to handle.

QtyHandled Decimal

The quantity already handled.

Result Decimal

The calculated result.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeGetFAPostingGroup

Raised before getting the fixed asset posting group.

[IntegrationEvent(False,False)]
local procedure OnBeforeGetFAPostingGroup(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeGetDefaultBin

Raised before getting the default bin for the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeGetDefaultBin(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

CurrentFieldNo Integer

The current field number.

OnBeforeGetItemTranslation

Raised before getting the item translation for the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeGetItemTranslation(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeGetSalesHeader

Raised before getting the sales header for the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeGetSalesHeader(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHanded: Boolean; var Currency: Record Currency; var HasSalesHeader: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The sales header to get.

IsHanded Boolean

Set to true to skip the default processing.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

HasSalesHeader Boolean

Set to true to indicate whether the sales header has been retrieved.

OnBeforeGetUnitCost

Raised before getting the unit cost for the sales line.

[IntegrationEvent(True,False)]
local procedure OnBeforeGetUnitCost(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; CurrFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

CurrFieldNo Integer

The current field number.

OnBeforeGetDeferralAmount

Raised before getting the deferral amount.

[IntegrationEvent(False,False)]
local procedure OnBeforeGetDeferralAmount(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var DeferralAmount: Decimal)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

DeferralAmount Decimal

The calculated deferral amount.

OnBeforeGetReservationQty

Raised before getting the reservation quantity.

[IntegrationEvent(False,False)]
local procedure OnBeforeGetReservationQty(var SalesLine: Record "Sales Line"; var QtyReserved: Decimal; var QtyReservedBase: Decimal; var QtyToReserve: Decimal; var QtyToReserveBase: Decimal; var Result: Decimal; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

QtyReserved Decimal

The reserved quantity.

QtyReservedBase Decimal

The reserved quantity in base unit.

QtyToReserve Decimal

The quantity to reserve.

QtyToReserveBase Decimal

The quantity to reserve in base unit.

Result Decimal

The calculated result.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeInitHeaderLocactionCode

Raised before initializing the header location code.

[IntegrationEvent(False,False)]
local procedure OnBeforeInitHeaderLocactionCode(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeInitOutstandingAmount

Raised before initializing the outstanding amount on the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeInitOutstandingAmount(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeInitQty

Raised before initializing the quantity on the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeInitQty(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; IsAsmToOrderAlwd: Boolean; IsAsmToOrderRqd: Boolean; var IsHandled: Boolean; var ShouldInitQty: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

IsAsmToOrderAlwd Boolean

Specifies whether assemble-to-order is allowed.

IsAsmToOrderRqd Boolean

Specifies whether assemble-to-order is required.

IsHandled Boolean

Set to true to skip the default processing.

ShouldInitQty Boolean

Specifies whether the quantity should be initialized.

OnBeforeInitQtyToAsm

Raised before initializing the quantity to assemble.

[IntegrationEvent(False,False)]
local procedure OnBeforeInitQtyToAsm(var SalesLine: Record "Sales Line"; CallingFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CallingFieldNo Integer

The field number that triggered the initialization.

OnBeforeInitQtyToReceive

Raised before initializing the quantity to receive.

[IntegrationEvent(False,False)]
local procedure OnBeforeInitQtyToReceive(var SalesLine: Record "Sales Line"; FieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

FieldNo Integer

The field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeInitQtyToShip

Raised before initializing the quantity to ship.

[IntegrationEvent(False,False)]
local procedure OnBeforeInitQtyToShip(var SalesLine: Record "Sales Line"; FieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

FieldNo Integer

The field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeInitType

Raised before initializing the type on the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeInitType(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

IsHandled Boolean

Set to true to skip the default processing.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnBeforeIsAsmToOrderRequired

Raised before determining if assemble-to-order is required.

[IntegrationEvent(False,False)]
local procedure OnBeforeIsAsmToOrderRequired(SalesLine: Record "Sales Line"; var Result: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Result Boolean

The result indicating whether assemble-to-order is required.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeLookupShortcutDimCode

Raised before looking up a shortcut dimension code.

[IntegrationEvent(False,False)]
local procedure OnBeforeLookupShortcutDimCode(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; FieldNumber: Integer; var ShortcutDimCode: Code[20]; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

FieldNumber Integer

The dimension field number.

ShortcutDimCode Code[20]

The shortcut dimension code.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeMaxQtyToInvoice

Raised before calculating the maximum quantity to invoice.

[IntegrationEvent(False,False)]
local procedure OnBeforeMaxQtyToInvoice(SalesLine: Record "Sales Line"; var MaxQty: Decimal; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

MaxQty Decimal

The calculated maximum quantity.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeMaxQtyToInvoiceBase

Raised before calculating the maximum quantity to invoice in base unit.

[IntegrationEvent(False,False)]
local procedure OnBeforeMaxQtyToInvoiceBase(SalesLine: Record "Sales Line"; var MaxQty: Decimal; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

MaxQty Decimal

The calculated maximum quantity in base unit.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeSelectMultipleItems

Raised before selecting multiple items.

[IntegrationEvent(False,False)]
local procedure OnBeforeSelectMultipleItems(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeSetDefaultGLAccountQuantity

Raised before setting the default G/L account quantity.

[IntegrationEvent(False,False)]
local procedure OnBeforeSetDefaultGLAccountQuantity(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeSetDefaultItemQuantity

Raised before setting the default item quantity.

[IntegrationEvent(False,False)]
local procedure OnBeforeSetDefaultItemQuantity(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeSetDefaultQuantity

Raised before setting the default quantity.

[IntegrationEvent(False,False)]
local procedure OnBeforeSetDefaultQuantity(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeSetICPartnerRefType

Raised before setting the IC partner reference type.

[IntegrationEvent(False,False)]
local procedure OnBeforeSetICPartnerRefType(var SalesLine: Record "Sales Line"; NewType: Enum "IC Partner Reference Type"; FieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

NewType Enum Microsoft.Intercompany.Partner."IC Partner Reference Type"

The new IC partner reference type.

FieldNo Integer

The field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeSetSalesHeader

Raised before setting the sales header.

[IntegrationEvent(False,False)]
local procedure OnBeforeSetSalesHeader(SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The sales header to set.

OnBeforeShowDimensions

Raised before showing dimensions for the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeShowDimensions(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var IsHandled: Boolean; var IsChanged: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

IsHandled Boolean

Set to true to skip the default processing.

IsChanged Boolean

Indicates whether dimensions were changed.

OnBeforeSignedXX

Raised before applying the signed value calculation.

[IntegrationEvent(False,False)]
local procedure OnBeforeSignedXX(var SalesLine: Record "Sales Line"; var Value: Decimal; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Value Decimal

The value to sign.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeShowItemSub

Raised before showing item substitution.

[IntegrationEvent(False,False)]
local procedure OnBeforeShowItemSub(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeShowReservation

Raised before showing reservation for the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeShowReservation(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeShowReservationEntries

Raised before showing reservation entries for the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeShowReservationEntries(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeTestJobPlanningLine

Raised before testing the job planning line.

[IntegrationEvent(False,False)]
local procedure OnBeforeTestJobPlanningLine(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; CallingFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

CallingFieldNo Integer

The field number that triggered the test.

OnBeforeTestStatusOpen

Raised before testing if the status is open.

[IntegrationEvent(False,False)]
local procedure OnBeforeTestStatusOpen(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; CallingFieldNo: Integer; var StatusCheckSuspended: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

IsHandled Boolean

Set to true to skip the default processing.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CallingFieldNo Integer

The field number that triggered the test.

StatusCheckSuspended Boolean

Specifies whether the status check is suspended.

OnBeforeTestQtyFromLindDiscountAmount

Raised before testing the quantity from line discount amount.

[IntegrationEvent(False,False)]
local procedure OnBeforeTestQtyFromLindDiscountAmount(var SalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeThrowWrongAmountError

Raised before throwing a wrong amount error.

[IntegrationEvent(False,False)]
local procedure OnBeforeThrowWrongAmountError(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeUpdateDates

Raised before updating dates on the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateDates(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var PlannedShipmentDateCalculated: Boolean; var PlannedDeliveryDateCalculated: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

PlannedShipmentDateCalculated Boolean

Indicates whether the planned shipment date was calculated.

PlannedDeliveryDateCalculated Boolean

Indicates whether the planned delivery date was calculated.

OnBeforeUpdatePrepmtAmounts

Raised before updating prepayment amounts on the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdatePrepmtAmounts(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; FieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

IsHandled Boolean

Set to true to skip the default processing.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

FieldNo Integer

The field number.

OnBeforeUpdatePrepmtSetupFields

Raised before updating prepayment setup fields.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdatePrepmtSetupFields(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

CurrentFieldNo Integer

The current field number.

OnBeforeUpdateLineDiscPct

Raised before updating the line discount percentage.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateLineDiscPct(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

OnBeforeUpdateUnitPrice

Raised before updating the unit price.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateUnitPrice(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CalledByFieldNo: Integer; CurrFieldNo: Integer; var Handled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CalledByFieldNo Integer

The field number that triggered the update.

CurrFieldNo Integer

The current field number.

Handled Boolean

Set to true to skip the default processing.

OnBeforeUpdateUnitPriceProcedure

Raised before the update unit price procedure.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateUnitPriceProcedure(var SalesLine: Record "Sales Line"; CalledByFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CalledByFieldNo Integer

The field number that triggered the update.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeUpdateAmounts

Raised before updating amounts on the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateAmounts(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeUpdateVATAmounts

Raised before updating VAT amounts on the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateVATAmounts(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnBeforeUpdateVATOnLines

Raised before updating VAT on lines.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateVATOnLines(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; var IsHandled: Boolean; QtyType: Integer; var LineWasModified: Boolean; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var PrepaymentLineAmountEntered: Boolean)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

IsHandled Boolean

Set to true to skip the default processing.

QtyType Integer

The quantity type.

LineWasModified Boolean

Indicates whether the line was modified.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

PrepaymentLineAmountEntered Boolean

Indicates whether a prepayment line amount was entered.

OnBeforeUpdateWithWarehouseShip

Raised before updating with warehouse ship information.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateWithWarehouseShip(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeUpdateQuantityFromUOMCode

Raised before updating quantity from unit of measure code.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateQuantityFromUOMCode(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeUpdateQtyToAsmFromSalesLineQtyToShip

Raised before updating quantity to assemble from quantity to ship.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateQtyToAsmFromSalesLineQtyToShip(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidateDropShipment

Raised before validating the drop shipment field.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateDropShipment(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CallingFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CallingFieldNo Integer

The field number that triggered the validation.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidateReturnReasonCode

Raised before validating the return reason code.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateReturnReasonCode(var SalesLine: Record "Sales Line"; CallingFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CallingFieldNo Integer

The field number that triggered the validation.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidatePurchasingCode

Raised before validating the purchasing code.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidatePurchasingCode(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidateUnitOfMeasureCodeFromNo

Raised before validating the unit of measure code from the No. field.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateUnitOfMeasureCodeFromNo(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var IsHandled: Boolean; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

IsHandled Boolean

Set to true to skip the default processing.

CurrentFieldNo Integer

The current field number.

OnBeforeValidateLineAmount

Raised before validating the line amount.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateLineAmount(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean; Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

OnBeforeValidatePrepmtAmttoDeduct

Raised before validating the prepayment amount to deduct.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidatePrepmtAmttoDeduct(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidatePrepmtLineAmount

Raised before validating the prepayment line amount.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidatePrepmtLineAmount(var SalesLine: Record "Sales Line"; PrePaymentLineAmountEntered: Boolean; var IsHandled: Boolean; FieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

PrePaymentLineAmountEntered Boolean

Indicates whether a prepayment line amount was entered.

IsHandled Boolean

Set to true to skip the default processing.

FieldNo Integer

The field number.

OnBeforeValidateBlanketOrderNo

Raised before validating the blanket order number.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateBlanketOrderNo(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidateType

Raised before validating the type field.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateType(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidateQtytoAsmtoOrderBase

Raised before validating the quantity to assemble to order base.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateQtytoAsmtoOrderBase(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidateQtyToInvoiceBase

Raised before validating the quantity to invoice base.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateQtyToInvoiceBase(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidateQtyToShipBase

Raised before validating the quantity to ship base.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateQtyToShipBase(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidateReturnQtyToReceiveBase

Raised before validating the return quantity to receive base.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateReturnQtyToReceiveBase(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeVerifyReservedQty

Raised before verifying the reserved quantity.

[IntegrationEvent(False,False)]
local procedure OnBeforeVerifyReservedQty(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CalledByFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CalledByFieldNo Integer

The field number that triggered the verification.

OnBeforeZeroAmountLine

Raised before determining if the line has zero amount.

[IntegrationEvent(False,False)]
local procedure OnBeforeZeroAmountLine(var SalesLine: Record "Sales Line"; QtyType: Option; var Result: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

QtyType Option

The quantity type option.

Result Boolean

The result indicating whether the line has zero amount.

IsHandled Boolean

Set to true to skip the default processing.

OnBlanketOrderIsRelatedOnAfterSetLoadFields

Raised after setting load fields when checking if a blanket order is related.

[IntegrationEvent(False,False)]
local procedure OnBlanketOrderIsRelatedOnAfterSetLoadFields(var BlanketOrderSalesLine: Record "Sales Line")

Parameters

Name Type Description
BlanketOrderSalesLine Table Microsoft.Sales.Document."Sales Line"

The blanket order sales line.

OnCalcVATAmountLinesOnBeforeAssignAmtToHandle

Raised before assigning amount to handle when calculating VAT amount lines.

[IntegrationEvent(False,False)]
local procedure OnCalcVATAmountLinesOnBeforeAssignAmtToHandle(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; IncludePrepayments: Boolean; QtyType: Option; var QtyToHandle: Decimal; var AmtToHandle: Decimal)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

IncludePrepayments Boolean

Specifies whether to include prepayments.

QtyType Option

The quantity type option.

QtyToHandle Decimal

The quantity to handle.

AmtToHandle Decimal

The amount to handle.

OnCalcVATAmountLinesOnBeforeQtyTypeGeneralCase

Raised before the general case when calculating VAT amount lines by quantity type.

[IntegrationEvent(False,False)]
local procedure OnCalcVATAmountLinesOnBeforeQtyTypeGeneralCase(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; IncludePrepayments: Boolean; QtyType: Option; var QtyToHandle: Decimal; var AmtToHandle: Decimal)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

IncludePrepayments Boolean

Specifies whether to include prepayments.

QtyType Option

The quantity type option.

QtyToHandle Decimal

The quantity to handle.

AmtToHandle Decimal

The amount to handle.

OnCalcVATAmountLinesOnBeforeAssignQuantities

Raised before assigning quantities when calculating VAT amount lines.

[IntegrationEvent(False,False)]
local procedure OnCalcVATAmountLinesOnBeforeAssignQuantities(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; var QtyToHandle: Decimal; var IsHandled: Boolean)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

QtyToHandle Decimal

The quantity to handle.

IsHandled Boolean

Set to true to skip the default processing.

OnCalcVATAmountLinesOnBeforeQtyTypeCase

Raised before the quantity type case when calculating VAT amount lines.

[IntegrationEvent(False,False)]
local procedure OnCalcVATAmountLinesOnBeforeQtyTypeCase(var VATAmountLine: Record "VAT Amount Line"; var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header")

Parameters

Name Type Description
VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnAfterInitHeaderDefaults

Raised after initializing header defaults on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterInitHeaderDefaults(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnAfterInitOutstanding

Raised after initializing outstanding values on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterInitOutstanding(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterInitOutstandingQty

Raised after initializing outstanding quantity on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterInitOutstandingQty(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterInitOutstandingAmount

Raised after initializing outstanding amount on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterInitOutstandingAmount(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

OnAfterInitQtyToInvoice

Raised after initializing the quantity to invoice.

[IntegrationEvent(False,False)]
local procedure OnAfterInitQtyToInvoice(var SalesLine: Record "Sales Line"; CurrFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrFieldNo Integer

The current field number.

OnAfterInitQtyToShip

Raised after initializing the quantity to ship.

[IntegrationEvent(False,False)]
local procedure OnAfterInitQtyToShip(var SalesLine: Record "Sales Line"; CurrFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrFieldNo Integer

The current field number.

OnAfterInitQtyToShip2

Raised after the second initialization of quantity to ship.

[IntegrationEvent(False,False)]
local procedure OnAfterInitQtyToShip2(var SalesLine: Record "Sales Line"; CurrFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrFieldNo Integer

The current field number.

OnAfterInitQtyToReceive

Raised after initializing the quantity to receive.

[IntegrationEvent(False,False)]
local procedure OnAfterInitQtyToReceive(var SalesLine: Record "Sales Line"; CurrFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrFieldNo Integer

The current field number.

OnAfterInitType

Raised after initializing the type on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterInitType(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnAfterCalcLineAmount

Raised after calculating the line amount.

[IntegrationEvent(False,False)]
local procedure OnAfterCalcLineAmount(var SalesLine: Record "Sales Line"; var LineAmount: Decimal)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

LineAmount Decimal

The calculated line amount.

OnAfterCalcInvDiscToInvoice

Raised after calculating the invoice discount to invoice.

[IntegrationEvent(False,False)]
local procedure OnAfterCalcInvDiscToInvoice(var SalesLine: Record "Sales Line"; OldInvDiscAmtToInv: Decimal)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OldInvDiscAmtToInv Decimal

The old invoice discount amount to invoice.

OnAfterCalcVATAmountLines

Raised after calculating VAT amount lines.

[IntegrationEvent(False,False)]
local procedure OnAfterCalcVATAmountLines(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; QtyType: Option)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

QtyType Option

The quantity type option.

OnAfterGetLineAmountToHandle

Raised after getting the line amount to handle.

[IntegrationEvent(False,False)]
local procedure OnAfterGetLineAmountToHandle(SalesLine: Record "Sales Line"; QtyToHandle: Decimal; var LineAmount: Decimal; var LineDiscAmount: Decimal)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

QtyToHandle Decimal

The quantity to handle.

LineAmount Decimal

The calculated line amount.

LineDiscAmount Decimal

The calculated line discount amount.

OnAfterGetLineWithPrice

Raised after getting the line with price interface.

[IntegrationEvent(True,False)]
local procedure OnAfterGetLineWithPrice(var LineWithPrice: Interface "Line With Price")

Parameters

Name Type Description
LineWithPrice Interface Microsoft.Pricing.PriceList."Line With Price"

The line with price interface.

OnAfterGetSKU

Raised after getting the stockkeeping unit.

[IntegrationEvent(False,False)]
local procedure OnAfterGetSKU(SalesLine: Record "Sales Line"; var Result: Boolean; var StockkeepingUnit: Record "Stockkeeping Unit")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Result Boolean

The result indicating whether the SKU was found.

StockkeepingUnit Table Microsoft.Inventory.Location."Stockkeeping Unit"

The stockkeeping unit record.

OnAfterSalesTaxCalculate

Raised after calculating sales tax.

[IntegrationEvent(False,False)]
local procedure OnAfterSalesTaxCalculate(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

OnAfterSalesTaxCalculateReverse

Raised after calculating sales tax in reverse.

[IntegrationEvent(False,False)]
local procedure OnAfterSalesTaxCalculateReverse(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

OnAfterSetReserveWithoutPurchasingCode

Raised after setting the reserve field without a purchasing code.

[IntegrationEvent(False,False)]
local procedure OnAfterSetReserveWithoutPurchasingCode(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; Item: Record Item)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

Item Table Microsoft.Inventory.Item.Item

The item record.

OnAfterShowDimensions

Raised after showing dimensions for the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterShowDimensions(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnAfterUpdateAmounts

Raised after updating amounts on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateAmounts(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

OnAfterUpdateAmountsDone

Raised after completing the update amounts process.

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateAmountsDone(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

OnAfterUpdateBaseAmounts

Raised after updating base amounts on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateBaseAmounts(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

OnAfterUpdateDates

Raised after updating dates on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateDates(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnBeforeUpdateItemReference

Raised before updating item reference on the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateItemReference(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CalledByFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CalledByFieldNo Integer

The field number that triggered the update.

IsHandled Boolean

Set to true to skip the default processing.

OnAfterUpdateItemReference

Raised after updating item reference on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateItemReference(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterUpdateVATAmounts

Raised after updating VAT amounts on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateVATAmounts(var SalesLine: Record "Sales Line"; Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

OnAfterUpdateVATOnLines

Raised after updating VAT on lines.

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateVATOnLines(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; QtyType: Option)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

QtyType Option

The quantity type option.

OnAfterUpdateWithWarehouseShip

Raised after updating with warehouse ship information.

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateWithWarehouseShip(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterCreateDim

Raised after creating dimensions on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterCreateDim(var SalesLine: Record "Sales Line"; CallingFieldNo: Integer; xSalesLine: Record "Sales Line"; DefaultDimSource: List of [Dictionary of [Integer, Code[20]]])

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CallingFieldNo Integer

The field number that triggered the dimension creation.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

DefaultDimSource List of [Dictionary of [Integer, Code[20]]]

The list of default dimension sources.

OnAfterSetReservationFilters

Raised after setting reservation filters.

[IntegrationEvent(False,False)]
local procedure OnAfterSetReservationFilters(var ReservEntry: Record "Reservation Entry"; SalesLine: Record "Sales Line")

Parameters

Name Type Description
ReservEntry Table Microsoft.Inventory.Tracking."Reservation Entry"

The reservation entry with filters applied.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterShowItemSub

Raised after showing item substitution.

[IntegrationEvent(False,False)]
local procedure OnAfterShowItemSub(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterUpdateICPartner

Raised after updating the IC partner on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateICPartner(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnAfterValidateReturnReasonCode

Raised after validating the return reason code.

[IntegrationEvent(False,False)]
local procedure OnAfterValidateReturnReasonCode(var SalesLine: Record "Sales Line"; CallingFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CallingFieldNo Integer

The field number that triggered the validation.

OnInsertOnAfterCheckInventoryConflict

Raised after checking for inventory conflict during insert.

[IntegrationEvent(False,False)]
local procedure OnInsertOnAfterCheckInventoryConflict(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var SalesLine2: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being inserted.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

SalesLine2 Table Microsoft.Sales.Document."Sales Line"

A secondary sales line record.

OnInsertFreightLineOnAfterCheckDocumentNo

Raised after checking the document number when inserting a freight line.

[IntegrationEvent(False,False)]
local procedure OnInsertFreightLineOnAfterCheckDocumentNo(var SalesLine: Record "Sales Line"; var SalesLineRec: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The freight line being inserted.

SalesLineRec Table Microsoft.Sales.Document."Sales Line"

The sales line record.

OnInitQtyToShip2OnBeforeCalcInvDiscToInvoice

Raised before calculating the invoice discount to invoice during the second quantity to ship initialization.

[IntegrationEvent(False,False)]
local procedure OnInitQtyToShip2OnBeforeCalcInvDiscToInvoice(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnInitQtyToAsmOnAfterCalcShouldUpdateQtyToAsm

Raised after calculating whether to update quantity to assemble during initialization.

[IntegrationEvent(False,False)]
local procedure OnInitQtyToAsmOnAfterCalcShouldUpdateQtyToAsm(var SalesLine: Record "Sales Line"; CallingFieldNo: Integer; xSalesLine: Record "Sales Line"; var ShouldUpdateQtyToAsm: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CallingFieldNo Integer

The field number that triggered the initialization.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

ShouldUpdateQtyToAsm Boolean

Specifies whether to update the quantity to assemble.

OnShowLineCommentsOnAfterSetFilters

Raised after setting filters when showing line comments.

[IntegrationEvent(False,False)]
local procedure OnShowLineCommentsOnAfterSetFilters(var SalesCommentLine: Record "Sales Comment Line")

Parameters

Name Type Description
SalesCommentLine Table Microsoft.Sales.Comment."Sales Comment Line"

The sales comment line with filters applied.

OnShowItemChargeAssgntOnBeforeCalcItemCharge

Raised before calculating item charge when showing item charge assignment.

[IntegrationEvent(False,False)]
local procedure OnShowItemChargeAssgntOnBeforeCalcItemCharge(var SalesLine: Record "Sales Line"; var ItemChargeAssgntLineAmt: Decimal; Currency: Record Currency; var IsHandled: Boolean; var ItemChargeAssgntSales: Record "Item Charge Assignment (Sales)")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

ItemChargeAssgntLineAmt Decimal

The item charge assignment line amount.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

IsHandled Boolean

Set to true to skip the default processing.

ItemChargeAssgntSales Table Microsoft.Sales.Document."Item Charge Assignment (Sales)"

The item charge assignment sales record.

OnShowItemChargeAssgntOnAfterCurrencyInitialize

Raised after initializing the currency when showing item charge assignment.

[IntegrationEvent(False,False)]
local procedure OnShowItemChargeAssgntOnAfterCurrencyInitialize(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

OnValidateTypeOnAfterVerifyChange

Raised after verifying the type change during type validation.

[IntegrationEvent(False,False)]
local procedure OnValidateTypeOnAfterVerifyChange(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnUpdateLineDiscPctOnAfterCalcIsOutOfStandardDiscPctRange

Raised after calculating whether the discount percentage is out of standard range.

[IntegrationEvent(False,False)]
local procedure OnUpdateLineDiscPctOnAfterCalcIsOutOfStandardDiscPctRange(var SalesLine: Record "Sales Line"; var IsOutOfStandardDiscPctRange: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsOutOfStandardDiscPctRange Boolean

Indicates whether the discount percentage is out of range.

OnUpdateUnitPriceByFieldOnAfterFindPrice

Raised after finding the price when updating unit price by field.

[IntegrationEvent(False,False)]
local procedure OnUpdateUnitPriceByFieldOnAfterFindPrice(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; CalledByFieldNo: Integer; CallingFieldNo: Integer)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CalledByFieldNo Integer

The field number that triggered the update.

CallingFieldNo Integer

The current field number.

OnUpdateUnitPriceOnBeforeFindPrice

Raised before finding the price when updating unit price.

[IntegrationEvent(False,False)]
local procedure OnUpdateUnitPriceOnBeforeFindPrice(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; CalledByFieldNo: Integer; CallingFieldNo: Integer; var IsHandled: Boolean; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CalledByFieldNo Integer

The field number that triggered the update.

CallingFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnValidateLocationCodeOnBeforeSetShipmentDate

Raised before setting the shipment date when validating location code.

[IntegrationEvent(False,False)]
local procedure OnValidateLocationCodeOnBeforeSetShipmentDate(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateTypeOnAfterCheckItem

Raised after checking the item during type validation.

[IntegrationEvent(False,False)]
local procedure OnValidateTypeOnAfterCheckItem(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnValidateTypeOnCopyFromTempSalesLine

Raised when copying from a temporary sales line during type validation.

[IntegrationEvent(False,False)]
local procedure OnValidateTypeOnCopyFromTempSalesLine(var SalesLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

TempSalesLine Table Microsoft.Sales.Document."Sales Line"

The temporary sales line.

OnValidateNoOnAfterInitHeaderDefaults

Raised after initializing header defaults when validating the No. field.

[IntegrationEvent(False,False)]
local procedure OnValidateNoOnAfterInitHeaderDefaults(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary; var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

TempSalesLine Table Microsoft.Sales.Document."Sales Line"

The temporary sales line.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnValidateNoOnAfterCalcShouldStopValidation

Raised after calculating whether to stop validation when validating the No. field.

[IntegrationEvent(False,False)]
local procedure OnValidateNoOnAfterCalcShouldStopValidation(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; CallingFieldNo: Integer; var ShouldStopValidation: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CallingFieldNo Integer

The calling field number.

ShouldStopValidation Boolean

Specifies whether validation should stop.

OnValidateNoOnAfterUpdateUnitPrice

Raised after updating the unit price when validating the No. field.

[IntegrationEvent(False,False)]
local procedure OnValidateNoOnAfterUpdateUnitPrice(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

TempSalesLine Table Microsoft.Sales.Document."Sales Line"

The temporary sales line.

OnValidateNoOnAfterVerifyChange

Raised after verifying the change when validating the No. field.

[IntegrationEvent(False,False)]
local procedure OnValidateNoOnAfterVerifyChange(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnValidateNoOnCopyFromTempSalesLine

Raised when copying from a temporary sales line during No. field validation.

[IntegrationEvent(False,False)]
local procedure OnValidateNoOnCopyFromTempSalesLine(var SalesLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

TempSalesLine Table Microsoft.Sales.Document."Sales Line"

The temporary sales line.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

OnValidateNoOnBeforeInitHeaderDefaults

Raised before initializing header defaults when validating the No. field.

[IntegrationEvent(False,False)]
local procedure OnValidateNoOnBeforeInitHeaderDefaults(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempSalesLine: Record "Sales Line" temporary)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

TempSalesLine Table Microsoft.Sales.Document."Sales Line"

The temporary sales line.

OnValidateNoOnBeforeInitRec

Raised before initializing the record when validating the No. field.

[IntegrationEvent(False,False)]
local procedure OnValidateNoOnBeforeInitRec(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CallingFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CallingFieldNo Integer

The calling field number.

OnValidateNoOnBeforeCalcShipmentDateForLocation

Raised before calculating the shipment date for location when validating the No. field.

[IntegrationEvent(True,False)]
local procedure OnValidateNoOnBeforeCalcShipmentDateForLocation(var IsHandled: Boolean; var SalesLine: Record "Sales Line")

Parameters

Name Type Description
IsHandled Boolean

Set to true to skip the default processing.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnValidateNoOnBeforeUpdateDates

Raised before updating dates when validating the No. field.

[IntegrationEvent(False,False)]
local procedure OnValidateNoOnBeforeUpdateDates(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; CallingFieldNo: Integer; var IsHandled: Boolean; var TempSalesLine: Record "Sales Line" temporary)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

CallingFieldNo Integer

The calling field number.

IsHandled Boolean

Set to true to skip the default processing.

TempSalesLine Table Microsoft.Sales.Document."Sales Line"

The temporary sales line.

OnValidateQuantityOnAfterCalcBaseQty

Raised after calculating the base quantity when validating the Quantity field.

[IntegrationEvent(False,False)]
local procedure OnValidateQuantityOnAfterCalcBaseQty(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnValidateQuantityOnBeforeCheckQuantityChangeForPriceCalc

Raised before checking quantity change for price calculation when validating the Quantity field.

[IntegrationEvent(False,False)]
local procedure OnValidateQuantityOnBeforeCheckQuantityChangeForPriceCalc(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

OnValidateQuantityOnBeforeGetUnitCost

Raised before getting the unit cost when validating the Quantity field.

[IntegrationEvent(False,False)]
local procedure OnValidateQuantityOnBeforeGetUnitCost(var SalesLine: Record "Sales Line"; Item: Record Item)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Item Table Microsoft.Inventory.Item.Item

The item record.

OnValidateQuantityOnBeforeResetAmounts

Raised before resetting amounts when validating the Quantity field.

[IntegrationEvent(False,False)]
local procedure OnValidateQuantityOnBeforeResetAmounts(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateQtyToShipAfterInitQty

Raised after initializing quantity when validating quantity to ship.

[IntegrationEvent(False,False)]
local procedure OnValidateQtyToShipAfterInitQty(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; CallingFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CallingFieldNo Integer

The calling field number.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateQtyToShipOnAfterCheck

Raised after checking the quantity to ship validation.

[IntegrationEvent(False,False)]
local procedure OnValidateQtyToShipOnAfterCheck(var SalesLine: Record "Sales Line"; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrentFieldNo Integer

The current field number.

OnValidateQtyToReturnAfterInitQty

Raised after initializing quantity when validating quantity to return.

[IntegrationEvent(False,False)]
local procedure OnValidateQtyToReturnAfterInitQty(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; CallingFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CallingFieldNo Integer

The calling field number.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateReturnQtyToReceiveOnAfterCheck

Raised after checking the return quantity to receive validation.

[IntegrationEvent(False,False)]
local procedure OnValidateReturnQtyToReceiveOnAfterCheck(var SalesLine: Record "Sales Line"; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrentFieldNo Integer

The current field number.

OnValidateShipmentDateOnAfterSalesLineVerifyChange

Raised after verifying the change when validating the shipment date.

[IntegrationEvent(False,False)]
local procedure OnValidateShipmentDateOnAfterSalesLineVerifyChange(var SalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var DoCheckReceiptOrderStatus: Boolean; var HasBeenShown: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrentFieldNo Integer

The current field number.

DoCheckReceiptOrderStatus Boolean

Specifies whether to check the receipt order status.

HasBeenShown Boolean

Specifies whether the validation dialog has been shown.

OnValidateVariantCodeOnAfterChecks

Raised after performing checks when validating the variant code.

[IntegrationEvent(False,False)]
local procedure OnValidateVariantCodeOnAfterChecks(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CallingFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CallingFieldNo Integer

The calling field number.

OnValidateVATProdPostingGroupOnBeforeCheckVATCalcType

Raised before checking the VAT calculation type when validating the VAT product posting group.

[IntegrationEvent(False,False)]
local procedure OnValidateVATProdPostingGroupOnBeforeCheckVATCalcType(var SalesLine: Record "Sales Line"; VATPostingSetup: Record "VAT Posting Setup"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATPostingSetup Table Microsoft.Finance.VAT.Setup."VAT Posting Setup"

The VAT posting setup record.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateVATProdPostingGroupOnBeforeUpdateUnitPrice

Raised before updating the unit price when validating the VAT product posting group.

[IntegrationEvent(False,False)]
local procedure OnValidateVATProdPostingGroupOnBeforeUpdateUnitPrice(var SalesLine: Record "Sales Line"; VATPostingSetup: Record "VAT Posting Setup"; var IsHandled: Boolean; xSalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATPostingSetup Table Microsoft.Finance.VAT.Setup."VAT Posting Setup"

The VAT posting setup record.

IsHandled Boolean

Set to true to skip the default processing.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

OnAfterTestStatusOpen

Raised after testing if the status is open.

[IntegrationEvent(False,False)]
local procedure OnAfterTestStatusOpen(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnAfterSelectMultipleItems

Raised after selecting multiple items.

[IntegrationEvent(False,False)]
local procedure OnAfterSelectMultipleItems(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterSetDefaultQuantity

Raised after setting the default quantity.

[IntegrationEvent(False,False)]
local procedure OnAfterSetDefaultQuantity(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnAfterUpdateTotalAmounts

Raised after updating total amounts.

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateTotalAmounts(var SalesLine: Record "Sales Line"; SalesLine2: Record "Sales Line"; var TotalAmount: Decimal; var TotalAmountInclVAT: Decimal; var TotalLineAmount: Decimal; var TotalInvDiscAmount: Decimal)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesLine2 Table Microsoft.Sales.Document."Sales Line"

A secondary sales line record.

TotalAmount Decimal

The total amount.

TotalAmountInclVAT Decimal

The total amount including VAT.

TotalLineAmount Decimal

The total line amount.

TotalInvDiscAmount Decimal

The total invoice discount amount.

OnCheckWarehouseOnAfterSetLocation2

Raised after setting the location when checking warehouse.

[IntegrationEvent(False,False)]
local procedure OnCheckWarehouseOnAfterSetLocation2(var SalesLine: Record "Sales Line"; var Location2: Record Location)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Location2 Table Microsoft.Inventory.Location.Location

The location record.

OnCheckWarehouseOnBeforeShowDialog

Raised before showing the dialog when checking warehouse.

[IntegrationEvent(False,False)]
local procedure OnCheckWarehouseOnBeforeShowDialog(var SalesLine: Record "Sales Line"; Location: Record Location; var ShowDialog: Option; var DialogText: Text[50])

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Location Table Microsoft.Inventory.Location.Location

The location record.

ShowDialog Option

The dialog option to show.

DialogText Text[50]

The dialog text.

OnCalcShipmentDateOnPlannedShipmentDate

Raised when calculating shipment date from planned shipment date.

[IntegrationEvent(False,False)]
local procedure OnCalcShipmentDateOnPlannedShipmentDate(SalesLine: Record "Sales Line"; var ShipmentDate: Date; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

ShipmentDate Date

The calculated shipment date.

IsHandled Boolean

Set to true to skip the default processing.

OnCopyFromItemOnAfterCheck

Raised after checking when copying from an item.

[IntegrationEvent(False,False)]
local procedure OnCopyFromItemOnAfterCheck(var SalesLine: Record "Sales Line"; Item: Record Item)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Item Table Microsoft.Inventory.Item.Item

The item record.

OnCopyFromItemOnAfterCheckInvtPostingSetupInventoryAccount

Raised after checking the inventory posting setup inventory account when copying from an item.

[IntegrationEvent(False,False)]
local procedure OnCopyFromItemOnAfterCheckInvtPostingSetupInventoryAccount(var SalesLine: Record "Sales Line"; Item: Record Item)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Item Table Microsoft.Inventory.Item.Item

The item record.

OnCopyFromResourceOnBeforeTestBlocked

Raised before testing if a resource is blocked when copying from a resource.

[IntegrationEvent(False,False)]
local procedure OnCopyFromResourceOnBeforeTestBlocked(var Resoiurce: Record Resource; var IsHandled: Boolean; var SalesLine: Record "Sales Line")

Parameters

Name Type Description
Resoiurce Table Microsoft.Projects.Resources.Resource.Resource

The resource record.

IsHandled Boolean

Set to true to skip the default processing.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnCopyFromResourceOnBeforeApplyResUnitCost

Raised before applying resource unit cost when copying from a resource.

[IntegrationEvent(False,False)]
local procedure OnCopyFromResourceOnBeforeApplyResUnitCost(var SalesLine: Record "Sales Line"; Resource: Record Resource; SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Resource Table Microsoft.Projects.Resources.Resource.Resource

The resource record.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnCreateDimOnBeforeUpdateGlobalDimFromDimSetID

Raised before updating global dimensions from dimension set ID when creating dimensions.

[IntegrationEvent(False,False)]
local procedure OnCreateDimOnBeforeUpdateGlobalDimFromDimSetID(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnGetDeferralPostDate

Raised when getting the deferral posting date.

[IntegrationEvent(False,False)]
local procedure OnGetDeferralPostDate(SalesHeader: Record "Sales Header"; var DeferralPostingDate: Date; SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

DeferralPostingDate Date

The deferral posting date.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterAutoAsmToOrder

Raised after auto assemble-to-order processing.

[IntegrationEvent(False,False)]
local procedure OnAfterAutoAsmToOrder(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnBeforeAutoAsmToOrder

Raised before auto assemble-to-order processing.

[IntegrationEvent(False,False)]
local procedure OnBeforeAutoAsmToOrder(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; CurrentFieldNo: Integer; var ATOLink: Record "Assemble-to-Order Link")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

CurrentFieldNo Integer

The current field number.

ATOLink Table Microsoft.Assembly.Document."Assemble-to-Order Link"

The assemble-to-order link record.

OnAfterBlanketOrderLookup

Raised after looking up the blanket order.

[IntegrationEvent(False,False)]
local procedure OnAfterBlanketOrderLookup(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnBeforeBlanketOrderLookup

Raised before looking up the blanket order.

[IntegrationEvent(False,False)]
local procedure OnBeforeBlanketOrderLookup(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeCalcPlannedDeliveryDate

Raised before calculating the planned delivery date.

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcPlannedDeliveryDate(var SalesLine: Record "Sales Line"; var PlannedDeliveryDate: Date; CallingFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

PlannedDeliveryDate Date

The planned delivery date.

CallingFieldNo Integer

The calling field number.

IsHandled Boolean

Set to true to skip the default processing.

OnGetGetFAPostingGroupOnBeforeExit

Raised before exiting when getting the fixed asset posting group.

[IntegrationEvent(False,False)]
local procedure OnGetGetFAPostingGroupOnBeforeExit(var SalesLine: Record "Sales Line"; var ShouldExit: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

ShouldExit Boolean

Specifies whether to exit the procedure.

OnBeforeOpenItemTrackingLines

Raised before opening item tracking lines.

[IntegrationEvent(False,False)]
local procedure OnBeforeOpenItemTrackingLines(SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnAfterCheckCreditLimitCondition

Raised after checking the credit limit condition.

[IntegrationEvent(False,False)]
local procedure OnAfterCheckCreditLimitCondition(SalesLine: Record "Sales Line"; var RunCheck: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

RunCheck Boolean

Specifies whether to run the credit limit check.

OnAfterValidateShortcutDimCode

Raised after validating a shortcut dimension code.

[IntegrationEvent(False,False)]
local procedure OnAfterValidateShortcutDimCode(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; FieldNumber: Integer; var ShortcutDimCode: Code[20])

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

FieldNumber Integer

The dimension field number.

ShortcutDimCode Code[20]

The shortcut dimension code.

OnBeforeUpdateItemChargeAssgnt

Raised before updating item charge assignment.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateItemChargeAssgnt(var SalesLine: Record "Sales Line"; var InHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

InHandled Boolean

Set to true to skip the default processing.

OnBeforeUpdateUnitPriceFromNonstockItem

Raised before updating the unit price from a nonstock item.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateUnitPriceFromNonstockItem(var SalesLine: Record "Sales Line"; NonstockItem: Record "Nonstock Item"; var InHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

NonstockItem Table Microsoft.Inventory.Item.Catalog."Nonstock Item"

The nonstock item record.

InHandled Boolean

Set to true to skip the default processing.

OnBeforeValidateDescription

Raised before validating the description field.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateDescription(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var InHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

InHandled Boolean

Set to true to skip the default processing.

OnBeforeValidatePlannedDeliveryDate

Raised before validating the planned delivery date.

[IntegrationEvent(True,False)]
local procedure OnBeforeValidatePlannedDeliveryDate(var IsHandled: Boolean; var SalesLine: Record "Sales Line")

Parameters

Name Type Description
IsHandled Boolean

Set to true to skip the default processing.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnBeforeValidatePlannedShipmentDate

Raised before validating the planned shipment date.

[IntegrationEvent(True,False)]
local procedure OnBeforeValidatePlannedShipmentDate(var IsHandled: Boolean; var SalesLine: Record "Sales Line")

Parameters

Name Type Description
IsHandled Boolean

Set to true to skip the default processing.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnBeforeValidateQuantityBase

Raised before validating the quantity base.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateQuantityBase(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CallingFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CallingFieldNo Integer

The calling field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidateShortcutDimCode

Raised before validating a shortcut dimension code.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateShortcutDimCode(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; FieldNumber: Integer; var ShortcutDimCode: Code[20]; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

FieldNumber Integer

The dimension field number.

ShortcutDimCode Code[20]

The shortcut dimension code.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeVerifyItemLineDim

Raised before verifying the item line dimension.

[IntegrationEvent(False,False)]
local procedure OnBeforeVerifyItemLineDim(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnUpdateAmountsOnAfterCalcLineAmount

Raised after calculating the line amount when updating amounts.

[IntegrationEvent(True,False)]
local procedure OnUpdateAmountsOnAfterCalcLineAmount(var SalesLine: Record "Sales Line"; var LineAmount: Decimal)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

LineAmount Decimal

The calculated line amount.

OnUpdateAmountOnBeforeCheckCreditLimit

Raised before checking the credit limit when updating amounts.

[IntegrationEvent(False,False)]
local procedure OnUpdateAmountOnBeforeCheckCreditLimit(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

CurrentFieldNo Integer

The current field number.

OnUpdateAmountsOnBeforeCheckLineAmount

Raised before checking the line amount when updating amounts.

[IntegrationEvent(True,False)]
local procedure OnUpdateAmountsOnBeforeCheckLineAmount(var IsHandled: Boolean; var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
IsHandled Boolean

Set to true to skip the default processing.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnUpdateVATOnLinesOnBeforeCalculateNewAmount

Raised before calculating the new amount when updating VAT on lines.

[IntegrationEvent(False,False)]
local procedure OnUpdateVATOnLinesOnBeforeCalculateNewAmount(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; VATAmountLine: Record "VAT Amount Line"; VATAmountLineReminder: Record "VAT Amount Line"; var NewAmount: Decimal; var VATAmount: Decimal)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

VATAmountLineReminder Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line remainder.

NewAmount Decimal

The new amount.

VATAmount Decimal

The VAT amount.

OnUpdateVATOnLinesOnAfterCalculateAmounts

Raised after calculating amounts when updating VAT on lines.

[IntegrationEvent(False,False)]
local procedure OnUpdateVATOnLinesOnAfterCalculateAmounts(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnUpdateVATOnLinesOnAfterCalculateNewAmount

Raised after calculating the new amount when updating VAT on lines.

[IntegrationEvent(False,False)]
local procedure OnUpdateVATOnLinesOnAfterCalculateNewAmount(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; VATAmountLine: Record "VAT Amount Line"; VATAmountLineReminder: Record "VAT Amount Line"; var NewAmountIncludingVAT: Decimal; VATAmount: Decimal; var NewAmount: Decimal; var NewVATBaseAmount: Decimal)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

VATAmountLineReminder Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line remainder.

NewAmountIncludingVAT Decimal

The new amount including VAT.

VATAmount Decimal

The VAT amount.

NewAmount Decimal

The new amount.

NewVATBaseAmount Decimal

The new VAT base amount.

OnUpdateVATOnLinesOnAfterSalesLineSetFilter

Raised after setting the filter on sales lines when updating VAT on lines.

[IntegrationEvent(False,False)]
local procedure OnUpdateVATOnLinesOnAfterSalesLineSetFilter(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line filter being applied.

OnUpdateVATOnLinesOnBeforeModifySalesLine

Raised before modifying the sales line when updating VAT on lines.

[IntegrationEvent(False,False)]
local procedure OnUpdateVATOnLinesOnBeforeModifySalesLine(var SalesLine: Record "Sales Line"; VATAmount: Decimal)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATAmount Decimal

The VAT amount.

OnUpdateVATOnLinesOnBeforeCalculateAmounts

Raised before calculating amounts when updating VAT on lines.

[IntegrationEvent(False,False)]
local procedure OnUpdateVATOnLinesOnBeforeCalculateAmounts(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnUpdateVATOnLinesOnBeforeTempVATAmountLineRemainderModify

Raised before modifying the temporary VAT amount line remainder when updating VAT on lines.

[IntegrationEvent(False,False)]
local procedure OnUpdateVATOnLinesOnBeforeTempVATAmountLineRemainderModify(SalesLine: Record "Sales Line"; var TempVATAmountLineRemainder: Record "VAT Amount Line"; VATAmount: Decimal; NewVATBaseAmount: Decimal)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

TempVATAmountLineRemainder Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The temporary VAT amount line remainder.

VATAmount Decimal

The VAT amount.

NewVATBaseAmount Decimal

The new VAT base amount.

OnUpdateVATOnLinesOnAfterCurrencyInitialize

Raised after initializing the currency when updating VAT on lines.

[IntegrationEvent(False,False)]
local procedure OnUpdateVATOnLinesOnAfterCurrencyInitialize(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

OnValidateDescriptionOnBeforeCannotFindDescrError

Raised before throwing a cannot find description error when validating description.

[IntegrationEvent(False,False)]
local procedure OnValidateDescriptionOnBeforeCannotFindDescrError(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateLocationCodeOnAfterSetOutboundWhseHandlingTime

Raised after setting the outbound warehouse handling time when validating location code.

[IntegrationEvent(False,False)]
local procedure OnValidateLocationCodeOnAfterSetOutboundWhseHandlingTime(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnCalcVATAmountLinesOnAfterCalcLineTotals

Raised after calculating line totals when calculating VAT amount lines.

[IntegrationEvent(False,False)]
local procedure OnCalcVATAmountLinesOnAfterCalcLineTotals(var VATAmountLine: Record "VAT Amount Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; Currency: Record Currency; QtyType: Option; var TotalVATAmount: Decimal; QtyToHandle: Decimal)

Parameters

Name Type Description
VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

QtyType Option

The quantity type option.

TotalVATAmount Decimal

The total VAT amount.

QtyToHandle Decimal

The quantity to handle.

OnCalcVATAmountLinesOnAfterSetFilters

Raised after setting filters when calculating VAT amount lines.

[IntegrationEvent(False,False)]
local procedure OnCalcVATAmountLinesOnAfterSetFilters(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line filter being applied.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnCalcVATAmountLinesOnAfterCalcShouldProcessRounding

Raised after calculating whether to process rounding when calculating VAT amount lines.

[IntegrationEvent(False,False)]
local procedure OnCalcVATAmountLinesOnAfterCalcShouldProcessRounding(var VATAmountLine: Record "VAT Amount Line"; Currency: Record Currency; var IsHandled: Boolean; var SalesLine: Record "Sales Line"; var TotalVATAmount: Decimal)

Parameters

Name Type Description
VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

IsHandled Boolean

Set to true to skip the default processing.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

TotalVATAmount Decimal

The total VAT amount.

OnCalcVATAmountLinesOnBeforeVATAmountLineUpdateLines

Raised before updating VAT amount lines when calculating VAT amount lines.

[IntegrationEvent(False,False)]
local procedure OnCalcVATAmountLinesOnBeforeVATAmountLineUpdateLines(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var VATAmountLine: Record "VAT Amount Line"; var TotalVATAmount: Decimal)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

TotalVATAmount Decimal

The total VAT amount.

OnCalcVATAmountLinesOnAfterCurrencyInitialize

Raised after initializing the currency when calculating VAT amount lines.

[IntegrationEvent(False,False)]
local procedure OnCalcVATAmountLinesOnAfterCurrencyInitialize(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

OnDeleteOnAfterSetSalesLineFilters

Raised after setting sales line filters during delete.

[IntegrationEvent(False,False)]
local procedure OnDeleteOnAfterSetSalesLineFilters(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line filter being applied.

OnDeleteOnBeforeTestStatusOpen

Raised before testing status open during delete.

[IntegrationEvent(False,False)]
local procedure OnDeleteOnBeforeTestStatusOpen(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 processing.

OnFindResUnitCostOnAfterInitResCost

Raised after initializing resource cost when finding resource unit cost.

[IntegrationEvent(False,False)]
local procedure OnFindResUnitCostOnAfterInitResCost(var SalesLine: Record "Sales Line"; var ResourceCost: Record "Resource Cost")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

ResourceCost Table Microsoft.Projects.Resources.Pricing."Resource Cost"

The resource cost record.

OnLookUpICPartnerReferenceTypeCaseElse

Raised for the else case when looking up IC partner reference type.

[IntegrationEvent(True,False)]
local procedure OnLookUpICPartnerReferenceTypeCaseElse()

OnModifyOnAfterSetFilters

Raised after setting filters during modify.

[IntegrationEvent(False,False)]
local procedure OnModifyOnAfterSetFilters(var SalesLine: Record "Sales Line"; var SalesLine2: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being modified.

SalesLine2 Table Microsoft.Sales.Document."Sales Line"

A secondary sales line record.

OnUpdateVATAmountsOnAfterSetSalesLineFilters

Raised after setting sales line filters when updating VAT amounts.

[IntegrationEvent(False,False)]
local procedure OnUpdateVATAmountsOnAfterSetSalesLineFilters(var SalesLine: Record "Sales Line"; var SalesLine2: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesLine2 Table Microsoft.Sales.Document."Sales Line"

A secondary sales line record.

IsHandled Boolean

Set to true to skip the default processing.

OnUpdateVATAmountsOnBeforeValidateLineDiscountPercent

Raised before validating line discount percent when updating VAT amounts.

[IntegrationEvent(False,False)]
local procedure OnUpdateVATAmountsOnBeforeValidateLineDiscountPercent(var SalesLine: Record "Sales Line"; var StatusCheckSuspended: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

StatusCheckSuspended Boolean

Specifies whether the status check is suspended.

OnUpdateVATAmountsOnBeforeCalcAmounts

Raised before calculating amounts when updating VAT amounts.

[IntegrationEvent(False,False)]
local procedure OnUpdateVATAmountsOnBeforeCalcAmounts(var SalesLine: Record "Sales Line"; var SalesLine2: Record "Sales Line"; var TotalAmount: Decimal; TotalAmountInclVAT: Decimal; var TotalLineAmount: Decimal; var TotalInvDiscAmount: Decimal; var TotalVATBaseAmount: Decimal; var TotalQuantityBase: Decimal; var IsHandled: Boolean; TotalVATDifference: Decimal)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesLine2 Table Microsoft.Sales.Document."Sales Line"

A secondary sales line record.

TotalAmount Decimal

The total amount.

TotalAmountInclVAT Decimal

The total amount including VAT.

TotalLineAmount Decimal

The total line amount.

TotalInvDiscAmount Decimal

The total invoice discount amount.

TotalVATBaseAmount Decimal

The total VAT base amount.

TotalQuantityBase Decimal

The total quantity in base unit.

IsHandled Boolean

Set to true to skip the default processing.

TotalVATDifference Decimal

The total VAT difference.

OnSelectItemEntryOnAfterSetFilters

Raised after setting filters when selecting an item entry.

[IntegrationEvent(False,False)]
local procedure OnSelectItemEntryOnAfterSetFilters(var ItemLedgEntry: Record "Item Ledger Entry"; SalesLine: Record "Sales Line"; CurrFieldNo: Integer)

Parameters

Name Type Description
ItemLedgEntry Table Microsoft.Inventory.Ledger."Item Ledger Entry"

The item ledger entry with filters applied.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrFieldNo Integer

The current field number.

OnValidateAmountIncludingVATOnAfterAssignAmounts

Raised after assigning amounts when validating the amount including VAT.

[IntegrationEvent(False,False)]
local procedure OnValidateAmountIncludingVATOnAfterAssignAmounts(var SalesLine: Record "Sales Line"; Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

OnValidateLineAmountOnbeforeTestUnitPrice

Raised before testing unit price when validating line amount.

[IntegrationEvent(False,False)]
local procedure OnValidateLineAmountOnbeforeTestUnitPrice(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

CurrentFieldNo Integer

The current field number.

OnValidatePrepaymentPercentageOnBeforeUpdatePrepmtSetupFields

Raised before updating prepayment setup fields when validating prepayment percentage.

[IntegrationEvent(False,False)]
local procedure OnValidatePrepaymentPercentageOnBeforeUpdatePrepmtSetupFields(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateQuantityOnBeforeCheckAssocPurchOrder

Raised before checking the associated purchase order when validating quantity.

[IntegrationEvent(False,False)]
local procedure OnValidateQuantityOnBeforeCheckAssocPurchOrder(var SalesLine: Record "Sales Line"; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrentFieldNo Integer

The current field number.

OnValidateQuantityOnBeforeCheckReceiptOrderStatus

Raised before checking receipt order status when validating quantity.

[IntegrationEvent(False,False)]
local procedure OnValidateQuantityOnBeforeCheckReceiptOrderStatus(var SalesLine: Record "Sales Line"; StatusCheckSuspended: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

StatusCheckSuspended Boolean

Specifies whether the status check is suspended.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateQuantityOnBeforeSalesLineVerifyChange

Raised before verifying sales line change when validating quantity.

[IntegrationEvent(False,False)]
local procedure OnValidateQuantityOnBeforeSalesLineVerifyChange(var SalesLine: Record "Sales Line"; StatusCheckSuspended: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

StatusCheckSuspended Boolean

Specifies whether the status check is suspended.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateQuantityOnBeforeValidateQtyToAssembleToOrder

Raised before validating quantity to assemble to order when validating quantity.

[IntegrationEvent(False,False)]
local procedure OnValidateQuantityOnBeforeValidateQtyToAssembleToOrder(var SalesLine: Record "Sales Line"; StatusCheckSuspended: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

StatusCheckSuspended Boolean

Specifies whether the status check is suspended.

IsHandled Boolean

Set to true to skip the default processing.

OnValidatePurchasingCodeOnAfterAssignPurchasingFields

Raised after assigning purchasing fields when validating the purchasing code.

[IntegrationEvent(False,False)]
local procedure OnValidatePurchasingCodeOnAfterAssignPurchasingFields(var SalesLine: Record "Sales Line"; PurchasingCode: Record Purchasing; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

PurchasingCode Table Microsoft.Inventory.Item.Catalog.Purchasing

The purchasing code record.

IsHandled Boolean

Set to true to skip the default processing.

OnValidatePurchasingCodeOnAfterSetReserveWithoutPurchasingCode

Raised after setting the reserve field without purchasing code when validating the purchasing code.

[IntegrationEvent(False,False)]
local procedure OnValidatePurchasingCodeOnAfterSetReserveWithoutPurchasingCode(var SalesLine: Record "Sales Line"; CurrentFieldNo: Integer; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrentFieldNo Integer

The current field number.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnValidatePurchasingCodeOnAfterResetPurchasingFields

Raised after resetting purchasing fields when validating the purchasing code.

[IntegrationEvent(False,False)]
local procedure OnValidatePurchasingCodeOnAfterResetPurchasingFields(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnValidateVATProdPostingGroupOnBeforeUpdateAmounts

Raised before updating amounts when validating the VAT product posting group.

[IntegrationEvent(False,False)]
local procedure OnValidateVATProdPostingGroupOnBeforeUpdateAmounts(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

OnBeforeShowDeferrals

Raised before showing deferrals.

[IntegrationEvent(False,False)]
local procedure OnBeforeShowDeferrals(SalesLine: Record "Sales Line"; var ReturnValue: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

ReturnValue Boolean

The return value.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeCheckWarehouse

Raised before checking the warehouse.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckWarehouse(SalesLine: Record "Sales Line"; var IsHandled: Boolean; var ShowDialogMessage: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

ShowDialogMessage Boolean

Specifies whether to show a dialog message.

OnBeforeCheckWarehouseForQtyToShip

Raised before checking warehouse for quantity to ship.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckWarehouseForQtyToShip(SalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnBeforeCreateDim

Raised before creating dimensions.

[IntegrationEvent(True,False)]
local procedure OnBeforeCreateDim(var IsHandled: Boolean; var SalesLine: Record "Sales Line"; FieldNo: Integer; DefaultDimSource: List of [Dictionary of [Integer, Code[20]]])

Parameters

Name Type Description
IsHandled Boolean

Set to true to skip the default processing.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

FieldNo Integer

The field number.

DefaultDimSource List of [Dictionary of [Integer, Code[20]]]

The list of default dimension sources.

OnBeforeShowUnitPriceChangedMsg

Raised before showing the unit price changed message.

[IntegrationEvent(False,False)]
local procedure OnBeforeShowUnitPriceChangedMsg(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidateUnitCostLCYOnGetUnitCost

Raised before validating unit cost LCY when getting unit cost.

[IntegrationEvent(True,False)]
local procedure OnBeforeValidateUnitCostLCYOnGetUnitCost(var IsHandled: Boolean; var SalesLine: Record "Sales Line"; Item: Record Item)

Parameters

Name Type Description
IsHandled Boolean

Set to true to skip the default processing.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Item Table Microsoft.Inventory.Item.Item

The item record.

OnBeforeValidateWorkTypeCode

Raised before validating the work type code.

[IntegrationEvent(True,False)]
local procedure OnBeforeValidateWorkTypeCode(var xSalesLine: Record "Sales Line"; var IsHandled: Boolean; var SalesLine: Record "Sales Line")

Parameters

Name Type Description
xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

IsHandled Boolean

Set to true to skip the default processing.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnBeforeValidateJobContractEntryNo

Raised before validating the job contract entry number.

[IntegrationEvent(True,False)]
local procedure OnBeforeValidateJobContractEntryNo(xSalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidateNo

Raised before validating the No. field.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateNo(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidateShipmentDate

Raised before validating the shipment date.

[IntegrationEvent(True,False)]
local procedure OnBeforeValidateShipmentDate(var IsHandled: Boolean; var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer)

Parameters

Name Type Description
IsHandled Boolean

Set to true to skip the default processing.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

OnBeforeValidateVATProdPostingGroup

Raised before validating the VAT product posting group.

[IntegrationEvent(True,False)]
local procedure OnBeforeValidateVATProdPostingGroup(var IsHandled: Boolean; var SalesLine: Record "Sales Line")

Parameters

Name Type Description
IsHandled Boolean

Set to true to skip the default processing.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnBeforeValidateVATProdPostingGroupTrigger

Raised before the VAT product posting group trigger validation.

[IntegrationEvent(True,False)]
local procedure OnBeforeValidateVATProdPostingGroupTrigger(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeAssignResourceUoM

Raised before assigning the resource unit of measure.

[IntegrationEvent(True,False)]
local procedure OnBeforeAssignResourceUoM(var ResUnitofMeasure: Record "Resource Unit of Measure"; var IsHandled: Boolean)

Parameters

Name Type Description
ResUnitofMeasure Table Microsoft.Projects.Resources.Resource."Resource Unit of Measure"

The resource unit of measure record.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeCheckPromisedDeliveryDate

Raised before checking the promised delivery date.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckPromisedDeliveryDate(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

IsHandled Boolean

Set to true to skip the default processing.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnBeforeCheckPrepmtAmtInvEmpty

Raised before checking if prepayment amount invoiced is empty.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckPrepmtAmtInvEmpty(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidateBlanketOrderLineNo

Raised before validating the blanket order line number.

[IntegrationEvent(True,False)]
local procedure OnBeforeValidateBlanketOrderLineNo(var IsHandled: Boolean; var SalesLine: Record "Sales Line")

Parameters

Name Type Description
IsHandled Boolean

Set to true to skip the default processing.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnBeforeCheckShipmentRelation

Raised before checking the shipment relation.

[IntegrationEvent(True,False)]
local procedure OnBeforeCheckShipmentRelation(var IsHandled: Boolean; var SalesLine: Record "Sales Line"; CurrentFieldNo: Integer)

Parameters

Name Type Description
IsHandled Boolean

Set to true to skip the default processing.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrentFieldNo Integer

The current field number.

OnBeforeCheckShipmentDateBeforeWorkDate

Raised before checking if the shipment date is before the work date.

[IntegrationEvent(True,False)]
local procedure OnBeforeCheckShipmentDateBeforeWorkDate(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var HasBeenShown: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

HasBeenShown Boolean

Indicates whether the warning has been shown.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeCheckRetRcptRelation

Raised before checking the return receipt relation.

[IntegrationEvent(True,False)]
local procedure OnBeforeCheckRetRcptRelation(var IsHandled: Boolean; var SalesLine: Record "Sales Line")

Parameters

Name Type Description
IsHandled Boolean

Set to true to skip the default processing.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnInitQtyToShipOnBeforeCheckServItemCreation

Raised before checking service item creation when initializing quantity to ship.

[IntegrationEvent(False,False)]
local procedure OnInitQtyToShipOnBeforeCheckServItemCreation(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnBeforeVerifyChangeForSalesLineReserve

Raised before verifying change for sales line reserve.

[IntegrationEvent(False,False)]
local procedure OnBeforeVerifyChangeForSalesLineReserve(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CallingFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CallingFieldNo Integer

The field number that triggered the verification.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeCheckInventoryPickConflict

Raised before checking for inventory pick conflict.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckInventoryPickConflict(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnCheckApplFromItemLedgEntryOnBeforeTestFieldType

Raised before testing the field type when checking application from item ledger entry.

[IntegrationEvent(False,False)]
local procedure OnCheckApplFromItemLedgEntryOnBeforeTestFieldType(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnBeforeCheckQuantitySign

Raised before checking the quantity sign.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckQuantitySign(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeCheckQuantitySignOnApplicationFrom

Raised before checking the quantity sign on application from.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckQuantitySignOnApplicationFrom(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeCheckReservedQtyBase

Raised before checking the reserved quantity base.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckReservedQtyBase(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeCheckNotInvoicedQty

Raised before checking the not invoiced quantity.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckNotInvoicedQty(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeShowReturnedUnitsError

Raised before showing the returned units error.

[IntegrationEvent(False,False)]
local procedure OnBeforeShowReturnedUnitsError(var SalesLine: Record "Sales Line"; var ItemLedgEntry: Record "Item Ledger Entry"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

ItemLedgEntry Table Microsoft.Inventory.Ledger."Item Ledger Entry"

The item ledger entry.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeTestDirectPosting

Raised before testing direct posting.

[IntegrationEvent(False,False)]
local procedure OnBeforeTestDirectPosting(var SalesLine: Record "Sales Line"; var GLAccount: Record "G/L Account"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

GLAccount Table Microsoft.Finance.GeneralLedger.Account."G/L Account"

The G/L account record.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

IsHandled Boolean

Set to true to skip the default processing.

OnAfterValidateLineDiscountPercent

Raised after validating the line discount percent.

[IntegrationEvent(False,False)]
local procedure OnAfterValidateLineDiscountPercent(var SalesLine: Record "Sales Line"; CurrFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrFieldNo Integer

The current field number.

OnValidateLineDiscountPercentOnBeforeUpdateAmounts

Raised before updating amounts when validating line discount percent.

[IntegrationEvent(False,False)]
local procedure OnValidateLineDiscountPercentOnBeforeUpdateAmounts(var SalesLine: Record "Sales Line"; CurrFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrFieldNo Integer

The current field number.

OnValidateLineDiscountPercentOnAfterTestStatusOpen

Raised after testing status open when validating line discount percent.

[IntegrationEvent(False,False)]
local procedure OnValidateLineDiscountPercentOnAfterTestStatusOpen(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

OnBeforeShowNonStock

Raised before showing a nonstock item.

[IntegrationEvent(False,False)]
local procedure OnBeforeShowNonStock(var SalesLine: Record "Sales Line"; var NonstockItem: Record "Nonstock Item"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

NonstockItem Table Microsoft.Inventory.Item.Catalog."Nonstock Item"

The nonstock item record.

IsHandled Boolean

Set to true to skip the default processing.

OnShowNonstockOnBeforeOpenCatalogItemList

Raised before opening the catalog item list when showing nonstock items.

[IntegrationEvent(False,False)]
local procedure OnShowNonstockOnBeforeOpenCatalogItemList(var SalesLine: Record "Sales Line"; var NonstockItem: Record "Nonstock Item")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

NonstockItem Table Microsoft.Inventory.Item.Catalog."Nonstock Item"

The nonstock item record.

OnValidateLocationCodeOnAfterCheckAssocPurchOrder

Raised after checking the associated purchase order when validating location code.

[IntegrationEvent(False,False)]
local procedure OnValidateLocationCodeOnAfterCheckAssocPurchOrder(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnValidateTypeOnBeforeInitRec

Raised before initializing the record when validating type.

[IntegrationEvent(False,False)]
local procedure OnValidateTypeOnBeforeInitRec(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

OnAfterSetReservationEntry

Raised after setting the reservation entry.

[IntegrationEvent(False,False)]
local procedure OnAfterSetReservationEntry(var ReservEntry: Record "Reservation Entry"; var SalesLine: Record "Sales Line")

Parameters

Name Type Description
ReservEntry Table Microsoft.Inventory.Tracking."Reservation Entry"

The reservation entry being set.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnValidateDropShipmentOnBeforeTestJobNo

Raised before testing the job number when validating drop shipment.

[IntegrationEvent(False,False)]
local procedure OnValidateDropShipmentOnBeforeTestJobNo(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; CurrFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

CurrFieldNo Integer

The current field number.

OnAfterGetReservationQty

Raised after getting the reservation quantity.

[IntegrationEvent(False,False)]
local procedure OnAfterGetReservationQty(var SalesLine: Record "Sales Line"; var QtyToReserve: Decimal; var QtyToReserveBase: Decimal; var Result: Decimal)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

QtyToReserve Decimal

The quantity to reserve.

QtyToReserveBase Decimal

The quantity to reserve in base unit.

Result Decimal

The calculated result.

OnBeforeValidateUnitCostLCY

Raised before validating the unit cost LCY.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateUnitCostLCY(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeUpdateICPartner

Raised before updating the IC partner.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateICPartner(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var ShouldUpdateICPartner: Boolean)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

ShouldUpdateICPartner Boolean

Specifies whether to update the IC partner.

OnAfterValidateBlanketOrderLineNo

Raised after validating the blanket order line number.

[IntegrationEvent(False,False)]
local procedure OnAfterValidateBlanketOrderLineNo(var SalesLine: Record "Sales Line"; BlanketOrderSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

BlanketOrderSalesLine Table Microsoft.Sales.Document."Sales Line"

The blanket order sales line.

OnAfterValidateLocationCode

Raised after validating the location code.

[IntegrationEvent(False,False)]
local procedure OnAfterValidateLocationCode(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnBeforeGetLocation

Raised before getting the location.

[IntegrationEvent(False,False)]
local procedure OnBeforeGetLocation(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var Location: Record Location; LocationCode: Code[10]; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

Location Table Microsoft.Inventory.Location.Location

The location record.

LocationCode Code[10]

The location code.

IsHandled Boolean

Set to true to skip the default processing.

OnCheckItemAvailableOnBeforeSalesLineCheck

Raised before the sales line check when checking item availability.

[IntegrationEvent(False,False)]
local procedure OnCheckItemAvailableOnBeforeSalesLineCheck(var SalesLine: Record "Sales Line"; CalledByFieldNo: Integer; CurrentFieldNo: Integer; xSalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CalledByFieldNo Integer

The field number that triggered the check.

CurrentFieldNo Integer

The current field number.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidateRequestedDeliveryDate

Raised before validating the requested delivery date.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateRequestedDeliveryDate(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidatePromisedDeliveryDate

Raised before validating the promised delivery date.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidatePromisedDeliveryDate(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateAmountOnAfterCalculateNormalVAT

Raised after calculating normal VAT when validating the amount.

[IntegrationEvent(False,False)]
local procedure OnValidateAmountOnAfterCalculateNormalVAT(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

OnValidateAmountIncludingVATOnAfterCalculateNormalVAT

Raised after calculating normal VAT when validating the amount including VAT.

[IntegrationEvent(False,False)]
local procedure OnValidateAmountIncludingVATOnAfterCalculateNormalVAT(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

OnInitHeaderDefaultsOnBeforeTestSellToCustomerNo

Raised before testing the sell-to customer number when initializing header defaults.

[IntegrationEvent(False,False)]
local procedure OnInitHeaderDefaultsOnBeforeTestSellToCustomerNo(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

IsHandled Boolean

Set to true to skip the default processing.

OnUpdatePrePaymentAmountsOnBeforeTestFieldPriceIncludingVAT

Raised before testing the price including VAT field when updating prepayment amounts.

[IntegrationEvent(False,False)]
local procedure OnUpdatePrePaymentAmountsOnBeforeTestFieldPriceIncludingVAT(SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; SalesOrderHeader: Record "Sales Header"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

SalesOrderHeader Table Microsoft.Sales.Document."Sales Header"

The sales order header.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateNoOnBeforeInitOutstanding

Raised before initializing outstanding values when validating the No. field.

[IntegrationEvent(False,False)]
local procedure OnValidateNoOnBeforeInitOutstanding(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnUpdateVATAmountOnAfterSetZeroAmointIfLineIsInvDiscountAmount

Raised after setting zero amount if the line is an invoice discount amount when updating VAT amount.

[IntegrationEvent(False,False)]
local procedure OnUpdateVATAmountOnAfterSetZeroAmointIfLineIsInvDiscountAmount(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnValidateVATProdPostingGroupOnBeforeVATPostingSetupGet

Raised before getting the VAT posting setup when validating the VAT product posting group.

[IntegrationEvent(False,False)]
local procedure OnValidateVATProdPostingGroupOnBeforeVATPostingSetupGet(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var IsHandled: Boolean; var VATPostingSetup: Record "VAT Posting Setup")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

IsHandled Boolean

Set to true to skip the default processing.

VATPostingSetup Table Microsoft.Finance.VAT.Setup."VAT Posting Setup"

The VAT posting setup record.

OnValidateNoOnBeforeCreateDimFromDefaultDim

Raised before creating dimensions from default dimensions when validating the No. field.

[IntegrationEvent(False,False)]
local procedure OnValidateNoOnBeforeCreateDimFromDefaultDim(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var TempSalesLine: Record "Sales Line" temporary)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

TempSalesLine Table Microsoft.Sales.Document."Sales Line"

The temporary sales line.

OnGenProdPostingGroupOnBeforeValidate

Raised before validating the general product posting group.

[IntegrationEvent(False,False)]
local procedure OnGenProdPostingGroupOnBeforeValidate(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var GenProdPostingGroup: Record "Gen. Product Posting Group"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

GenProdPostingGroup Table Microsoft.Finance.GeneralLedger.Setup."Gen. Product Posting Group"

The general product posting group record.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateAmountOnAfterAssignAmount

Raised after assigning the amount when validating the amount field.

[IntegrationEvent(False,False)]
local procedure OnValidateAmountOnAfterAssignAmount(var SalesLine: Record "Sales Line"; Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Currency Table Microsoft.Finance.Currency.Currency

The currency record.

OnBeforeCheckLineAmount

Raised before checking the line amount.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckLineAmount(var SalesLine: Record "Sales Line"; MaxLineAmount: Decimal; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

MaxLineAmount Decimal

The maximum line amount.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateQtyToAssembleToOrderOnBeforeAutoAsmToOrder

Raised before auto assemble-to-order when validating quantity to assemble to order.

[IntegrationEvent(False,False)]
local procedure OnValidateQtyToAssembleToOrderOnBeforeAutoAsmToOrder(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateUnitOfMeasureCodeOnBeforeGetUnitOfMeasure

Raised before getting the unit of measure when validating unit of measure code.

[IntegrationEvent(False,False)]
local procedure OnValidateUnitOfMeasureCodeOnBeforeGetUnitOfMeasure(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

CurrentFieldNo Integer

The current field number.

OnValidateUnitOfMeasureCodeOnAfterGetItemData

Raised after getting item data when validating unit of measure code.

[IntegrationEvent(False,False)]
local procedure OnValidateUnitOfMeasureCodeOnAfterGetItemData(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; Item: Record Item)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

Item Table Microsoft.Inventory.Item.Item

The item record.

OnDeleteOnAfterSalesLine2DeleteAll

Raised after deleting all secondary sales lines during delete.

[IntegrationEvent(False,False)]
local procedure OnDeleteOnAfterSalesLine2DeleteAll(var SalesLine: Record "Sales Line"; var SalesLine2: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being deleted.

SalesLine2 Table Microsoft.Sales.Document."Sales Line"

The secondary sales line record.

OnValidateQuantityOnAfterInitQty

Raised after initializing quantity when validating the Quantity field.

[IntegrationEvent(False,False)]
local procedure OnValidateQuantityOnAfterInitQty(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateUnitOfMeasureCodeOnAfterGetUnitOfMeasure

Raised after getting the unit of measure when validating unit of measure code.

[IntegrationEvent(False,False)]
local procedure OnValidateUnitOfMeasureCodeOnAfterGetUnitOfMeasure(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

OnValidateUnitOfMeasureCodeOnAfterEnterSalesItemReference

Raised after entering sales item reference when validating unit of measure code.

[IntegrationEvent(False,False)]
local procedure OnValidateUnitOfMeasureCodeOnAfterEnterSalesItemReference(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnValidateUnitOfMeasureCodeOnAfterCalcShouldPlanPriceCalc

Raised after calculating whether to plan price calculation when validating unit of measure code.

[IntegrationEvent(False,False)]
local procedure OnValidateUnitOfMeasureCodeOnAfterCalcShouldPlanPriceCalc(var SalesLine: Record "Sales Line"; var ShouldPlanPriceCalc: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

ShouldPlanPriceCalc Boolean

Specifies whether to plan price calculation.

OnValidateQtyToAssembleToOrderOnOtherDocTypeBeforeTestField

Raised before testing field for other document types when validating quantity to assemble to order.

[IntegrationEvent(False,False)]
local procedure OnValidateQtyToAssembleToOrderOnOtherDocTypeBeforeTestField(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateQtyToShipOnAfterCheckQuantity

Raised after checking quantity when validating quantity to ship.

[IntegrationEvent(False,False)]
local procedure OnValidateQtyToShipOnAfterCheckQuantity(var SalesLine: Record "Sales Line"; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrentFieldNo Integer

The current field number.

OnValidateQtyToInvoiceOnBeforeCalcInvDiscToInvoice

Raised before calculating invoice discount to invoice when validating quantity to invoice.

[IntegrationEvent(False,False)]
local procedure OnValidateQtyToInvoiceOnBeforeCalcInvDiscToInvoice(var SalesLine: Record "Sales Line"; CurrentFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrentFieldNo Integer

The current field number.

OnValidateQuantityOnAfterCalcShouldCalcWithReturnQtyReceived

Raised after calculating whether to use return quantity received when validating quantity.

[IntegrationEvent(False,False)]
local procedure OnValidateQuantityOnAfterCalcShouldCalcWithReturnQtyReceived(var SalesLine: Record "Sales Line"; var ShouldCalcWithReturnQtyReceived: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

ShouldCalcWithReturnQtyReceived Boolean

Specifies whether to calculate with return quantity received.

OnValidateQuantityOnAfterCalcShouldVerifyQtyForItem

Raised after calculating whether to verify quantity for item when validating quantity.

[IntegrationEvent(False,False)]
local procedure OnValidateQuantityOnAfterCalcShouldVerifyQtyForItem(var SalesLine: Record "Sales Line"; var ShouldVerifyQtyForItem: Boolean; xSalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

ShouldVerifyQtyForItem Boolean

Specifies whether to verify quantity for item.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

OnValidatePurchasingCodeOnAfterCalcShouldAssignValuesFromPurchasingCode

Raised after calculating whether to assign values from purchasing code when validating the purchasing code.

[IntegrationEvent(False,False)]
local procedure OnValidatePurchasingCodeOnAfterCalcShouldAssignValuesFromPurchasingCode(var SalesLine: Record "Sales Line"; var ShouldAssignValuesFromPurchasingCode: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

ShouldAssignValuesFromPurchasingCode Boolean

Specifies whether to assign values from purchasing code.

OnValidateQuantityOnBeforeCalcWithQuantityShipped

Raised before calculating with quantity shipped when validating quantity.

[IntegrationEvent(False,False)]
local procedure OnValidateQuantityOnBeforeCalcWithQuantityShipped(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnUpdateVATAmountsOnBeforeIfLineIsInvDiscountAmount

Raised before determining if the line is an invoice discount amount when updating VAT amounts.

[IntegrationEvent(False,False)]
local procedure OnUpdateVATAmountsOnBeforeIfLineIsInvDiscountAmount(var SalesLine: Record "Sales Line"; var LineIsInvDiscountAmount: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

LineIsInvDiscountAmount Boolean

Specifies whether the line is an invoice discount amount.

OnBeforeInitTableValuePair

Raised before initializing a table value pair for dimensions.

[IntegrationEvent(False,False)]
local procedure OnBeforeInitTableValuePair(var TableValuePair: Dictionary of [Integer, Code[20]]; FieldNo: Integer; var IsHandled: Boolean; var SalesLine: Record "Sales Line")

Parameters

Name Type Description
TableValuePair Dictionary of [Integer, Code[20]]

The dictionary containing table and value pairs.

FieldNo Integer

The field number triggering the initialization.

IsHandled Boolean

Set to true to skip the default processing.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterInitTableValuePair

Raised after initializing a table value pair for dimensions.

[IntegrationEvent(False,False)]
local procedure OnAfterInitTableValuePair(var TableValuePair: Dictionary of [Integer, Code[20]]; FieldNo: Integer; var SalesLine: Record "Sales Line")

Parameters

Name Type Description
TableValuePair Dictionary of [Integer, Code[20]]

The dictionary containing table and value pairs.

FieldNo Integer

The field number that triggered the initialization.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnGetDefaultBinOnAfterWMSGetDefaultBin

Raised after getting the default bin from WMS.

[IntegrationEvent(False,False)]
local procedure OnGetDefaultBinOnAfterWMSGetDefaultBin(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnBeforeInitDeferralCode

Raised before initializing the deferral code on the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeInitDeferralCode(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeGetDate

Raised before getting the date for the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeGetDate(var SalesLine: Record "Sales Line"; var ResultDate: Date; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

ResultDate Date

The resulting date value.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidateQuantity

Raised before validating the quantity on the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateQuantity(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; CallingFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CallingFieldNo Integer

The field number that triggered the validation.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeUpdatePrePaymentAmounts

Raised before updating prepayment amounts on the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdatePrePaymentAmounts(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateNoOnAfterCreateDimFromDefaultDim

Raised after creating dimensions from default dimensions when validating the No. field.

[IntegrationEvent(False,False)]
local procedure OnValidateNoOnAfterCreateDimFromDefaultDim(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; CallingFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

CallingFieldNo Integer

The field number that triggered the validation.

OnAfterIsInbound

Raised after determining if the sales line represents an inbound document.

[IntegrationEvent(False,False)]
local procedure OnAfterIsInbound(SalesLine: Record "Sales Line"; var IsInboundDocument: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsInboundDocument Boolean

Specifies whether the document is inbound.

OnBeforeBlanketOrderIsRelated

Raised before checking if a blanket order is related to the current sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeBlanketOrderIsRelated(var CurrentSalesLine: Record "Sales Line"; var BlanketOrderSalesLine: Record "Sales Line"; var IsHandled: Boolean; var Result: Boolean)

Parameters

Name Type Description
CurrentSalesLine Table Microsoft.Sales.Document."Sales Line"

The current sales line being processed.

BlanketOrderSalesLine Table Microsoft.Sales.Document."Sales Line"

The blanket order sales line to check.

IsHandled Boolean

Set to true to skip the default processing.

Result Boolean

The result of the check.

OnCheckIfSalesLineMeetsReservedFromStockSetting

Raised when checking if the sales line meets the reserved from stock setting.

[IntegrationEvent(False,False)]
local procedure OnCheckIfSalesLineMeetsReservedFromStockSetting(QtyToPost: Decimal; ReservedFromStock: Enum "Reservation From Stock"; var Result: Boolean)

Parameters

Name Type Description
QtyToPost Decimal

The quantity to post.

ReservedFromStock Enum Microsoft.Inventory.Tracking."Reservation From Stock"

The reservation from stock setting.

Result Boolean

The result of the check.

OnBeforeGetATOBin

Raised before getting the assemble-to-order bin code.

[IntegrationEvent(False,False)]
local procedure OnBeforeGetATOBin(SalesLine: Record "Sales Line"; Location: Record Location; var BinCode: Code[20]; var BinCodeNotEmpty: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Location Table Microsoft.Inventory.Location.Location

The location record.

BinCode Code[20]

The bin code to retrieve.

BinCodeNotEmpty Boolean

Specifies whether the bin code is not empty.

IsHandled Boolean

Set to true to skip the default processing.

OnCreateDimFromDefaultDimOnBeforeCreateDim

Raised before creating dimensions when creating dimensions from default dimensions.

[IntegrationEvent(False,False)]
local procedure OnCreateDimFromDefaultDimOnBeforeCreateDim(var SalesLine: Record "Sales Line"; var SalesHeader: Record "Sales Header"; var ShouldCreateDim: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

ShouldCreateDim Boolean

Specifies whether dimensions should be created.

OnBeforeAttachToInventoryItemLine

Raised before attaching to an inventory item line.

[IntegrationEvent(False,False)]
local procedure OnBeforeAttachToInventoryItemLine(var SelectedSalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SelectedSalesLine Table Microsoft.Sales.Document."Sales Line"

The selected sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnUpdatePricesIncludingVATAmountsOnAfterCalculateNormalVAT

Raised after calculating normal VAT when updating prices including VAT amounts.

[IntegrationEvent(False,False)]
local procedure OnUpdatePricesIncludingVATAmountsOnAfterCalculateNormalVAT(var SalesLine: Record "Sales Line"; var Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Currency Table Microsoft.Finance.Currency.Currency

The currency record used for calculations.

OnUpdateVATAmountsOnAfterCalculateNormalVAT

Raised after calculating normal VAT when updating VAT amounts.

[IntegrationEvent(False,False)]
local procedure OnUpdateVATAmountsOnAfterCalculateNormalVAT(var SalesLine: Record "Sales Line"; var Currency: Record Currency)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Currency Table Microsoft.Finance.Currency.Currency

The currency record used for calculations.

OnOutstandingInvoiceAmountFromShipmentOnAfterSetFilter

Raised after setting filters when calculating outstanding invoice amount from shipment.

[IntegrationEvent(False,False)]
local procedure OnOutstandingInvoiceAmountFromShipmentOnAfterSetFilter(var SalesLineCopy: Record "Sales Line")

Parameters

Name Type Description
SalesLineCopy Table Microsoft.Sales.Document."Sales Line"

The sales line copy used for filtering.

OnAfterSetHideValidationDialog

Raised after setting the hide validation dialog flag on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterSetHideValidationDialog(var SalesLine: Record "Sales Line"; NewHideValidationDialog: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

NewHideValidationDialog Boolean

The new hide validation dialog value.

OnBeforeGetLineAmountToHandle

Raised before getting the line amount to handle.

[IntegrationEvent(False,False)]
local procedure OnBeforeGetLineAmountToHandle(var QtyToHandle: Decimal; var SalesLine: Record "Sales Line"; Currency: Record Currency; var IsHandled: Boolean)

Parameters

Name Type Description
QtyToHandle Decimal

The quantity to handle.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Currency Table Microsoft.Finance.Currency.Currency

The currency record used for calculations.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateNoOnBeforeCheckPostingSetups

Raised before checking posting setups when validating the No. field.

[IntegrationEvent(False,False)]
local procedure OnValidateNoOnBeforeCheckPostingSetups(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeReduceInvoiceDiscValueOnHeader

Raised before reducing the invoice discount value on the header.

[IntegrationEvent(False,False)]
local procedure OnBeforeReduceInvoiceDiscValueOnHeader(var SalesHeader: Record "Sales Header"; InvDiscountAmount: Decimal; var IsHandled: Boolean)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The sales header being processed.

InvDiscountAmount Decimal

The invoice discount amount.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeDeleteChargeChargeAssgnt

Raised before deleting item charge assignments.

[IntegrationEvent(False,False)]
local procedure OnBeforeDeleteChargeChargeAssgnt(SalesDocumentType: Enum "Sales Document Type"; DocNo: Code[20]; DocLineNo: Integer; var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesDocumentType Enum Microsoft.Sales.Document."Sales Document Type"

The sales document type.

DocNo Code[20]

The document number.

DocLineNo Integer

The document line number.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateVariantCodeBeforeCheckBlocked

Raised before checking if the item variant is blocked when validating the variant code.

[IntegrationEvent(False,False)]
local procedure OnValidateVariantCodeBeforeCheckBlocked(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateQuantityOnAfterInitializeAmounts

Raised after initializing amounts when validating quantity.

[IntegrationEvent(False,False)]
local procedure OnValidateQuantityOnAfterInitializeAmounts(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnValidateBinCodeOnBeforeTestFields

Raised before testing fields when validating the bin code.

[IntegrationEvent(False,False)]
local procedure OnValidateBinCodeOnBeforeTestFields(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnApplToItemEntryValidateOnBeforeMessage

Raised before displaying a message when validating the Appl.-to Item Entry field.

[IntegrationEvent(False,False)]
local procedure OnApplToItemEntryValidateOnBeforeMessage(var SalesLine: Record "Sales Line"; CurrFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeProcessSalesLine

Raised before processing the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeProcessSalesLine(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeUpdatePlanned

Raised before updating the planned flag on the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdatePlanned(var SalesLine: Record "Sales Line"; var Result: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

Result Boolean

The result of the update operation.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeDeleteItemChargeAssignment

Raised before deleting an item charge assignment.

[IntegrationEvent(False,False)]
local procedure OnBeforeDeleteItemChargeAssignment(DocType: Enum "Sales Document Type"; DocNo: Code[20]; DocLineNo: Integer; var IsHandled: Boolean; CurrentFieldNo: Integer)

Parameters

Name Type Description
DocType Enum Microsoft.Sales.Document."Sales Document Type"

The sales document type.

DocNo Code[20]

The document number.

DocLineNo Integer

The document line number.

IsHandled Boolean

Set to true to skip the default processing.

CurrentFieldNo Integer

The current field number.

OnShowItemChargeAssgntOnBeforeCreateDocChargeAssgn

Raised before creating document charge assignment when showing item charge assignment.

[IntegrationEvent(False,False)]
local procedure OnShowItemChargeAssgntOnBeforeCreateDocChargeAssgn(SalesLine: Record "Sales Line"; var DoCreateDocChargeAssgnForReturnReceiptNo: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

DoCreateDocChargeAssgnForReturnReceiptNo Boolean

Specifies whether to create document charge assignment for return receipt.

OnBeforeUpdateDeferralAmounts

Raised before updating deferral amounts on the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateDeferralAmounts(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnShowDimensionsOnAfterEditDimensionSet

Raised after editing the dimension set when showing dimensions.

[IntegrationEvent(False,False)]
local procedure OnShowDimensionsOnAfterEditDimensionSet(var SalesLine: Record "Sales Line"; OldDimensionSet: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OldDimensionSet Integer

The old dimension set ID before editing.

OnBeforeDoUpdateICPartner

Raised before updating the IC partner on the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeDoUpdateICPartner(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesHeader Table Microsoft.Sales.Document."Sales Header"

The parent sales header.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeValidateShippingAgentServiceCode

Raised before validating the shipping agent service code on the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateShippingAgentServiceCode(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

IsHandled Boolean

Set to true to skip the default processing.

OnValidateLocationCodeOnBeforeTestReservedQtyBase

Raised before testing reserved quantity base when validating the location code.

[IntegrationEvent(False,False)]
local procedure OnValidateLocationCodeOnBeforeTestReservedQtyBase(SalesLine: Record "Sales Line"; var IsHanlded: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHanlded Boolean

Set to true to skip the default processing.

OnBeforeValidateUnitPrice

Raised before validating the unit price on the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateUnitPrice(var SalesLine: Record "Sales Line"; CurrentFieldNo: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrentFieldNo Integer

The current field number.

IsHandled Boolean

Set to true to skip the default processing.

OnCheckLocationOnWMSOnBeforeCaseDocumentType

Raised before processing document type case when checking location on WMS.

[IntegrationEvent(False,False)]
local procedure OnCheckLocationOnWMSOnBeforeCaseDocumentType(var SalesLine: Record "Sales Line"; DialogText: Text; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

DialogText Text

The dialog text to display.

IsHandled Boolean

Set to true to skip the default processing.

OnCheckServItemCreation

Raised when checking service item creation for the sales line.

[IntegrationEvent(False,False)]
local procedure OnCheckServItemCreation(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnBeforeGetShippingTime

Raised before getting the shipping time for the sales line.

[IntegrationEvent(False,False)]
local procedure OnBeforeGetShippingTime(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

IsHandled Boolean

Set to true to skip the default processing.

OnCalcVATAmountLinesOnBeforeProcessSalesLine

Raised before processing the sales line when calculating VAT amount lines.

[IntegrationEvent(False,False)]
local procedure OnCalcVATAmountLinesOnBeforeProcessSalesLine(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnCalcVATAmountLinesOnAfterInsertNewVATAmountLine

Raised after inserting a new VAT amount line when calculating VAT amount lines.

[IntegrationEvent(False,False)]
local procedure OnCalcVATAmountLinesOnAfterInsertNewVATAmountLine(var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line that was inserted.

OnUpdateVATOnLinesOnAfterUpdateBaseAmounts

Raised after updating base amounts when updating VAT on lines.

[IntegrationEvent(False,False)]
local procedure OnUpdateVATOnLinesOnAfterUpdateBaseAmounts(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var VATAmountLine: Record "VAT Amount Line"; Currency: Record Currency)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The sales header being processed.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

TempVATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The temporary VAT amount line record.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

Currency Table Microsoft.Finance.Currency.Currency

The currency record used for calculations.

OnBeforeSumVATAmountLine

Raised before summing the VAT amount line.

[IntegrationEvent(False,False)]
local procedure OnBeforeSumVATAmountLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; QtyType: Option; AmtToHandle: Decimal; QtyToHandle: Decimal; var IsHandled: Boolean)

Parameters

Name Type Description
SalesHeader Table Microsoft.Sales.Document."Sales Header"

The sales header being processed.

SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

QtyType Option

The quantity type (General, Invoicing, or Shipping).

AmtToHandle Decimal

The amount to handle.

QtyToHandle Decimal

The quantity to handle.

IsHandled Boolean

Specifies whether the sum operation is handled.

OnSumVATAmountLineOnBeforeModify

Raised before modifying the sales line when summing VAT amount lines.

[IntegrationEvent(False,False)]
local procedure OnSumVATAmountLineOnBeforeModify(var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

OnInsertVATAmountOnBeforeInsert

Raised before inserting when inserting a VAT amount.

[IntegrationEvent(False,False)]
local procedure OnInsertVATAmountOnBeforeInsert(var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

OnFindVATAmountLineOnAfterSetFilters

Raised after setting filters when finding a VAT amount line.

[IntegrationEvent(False,False)]
local procedure OnFindVATAmountLineOnAfterSetFilters(var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

The VAT amount line record.

OnBeforeCalcShipmentDateForLocation

Raised before calculating the shipment date for a location.

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcShipmentDateForLocation(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

IsHandled Boolean

Set to true to skip the default processing.

OnBeforeTestQuantityFieldsOnValidateUnitOfMeasure

Raised before testing quantity fields when validating the unit of measure.

[IntegrationEvent(False,False)]
local procedure OnBeforeTestQuantityFieldsOnValidateUnitOfMeasure(var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

IsHandled Boolean

Set to true to skip the default processing.

OnAfterClearVATPct

Raised after clearing the VAT percentage on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterClearVATPct(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterClearPrepaymentVATPct

Raised after clearing the prepayment VAT percentage on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterClearPrepaymentVATPct(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterClearVATDifference

Raised after clearing the VAT difference on the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterClearVATDifference(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterGetVATPct

Raised after getting the VAT percentage from the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterGetVATPct(var SalesLine: Record "Sales Line"; var VATPct: Decimal)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATPct Decimal

The VAT percentage value.

OnAfterGetPrepaymentVATPct

Raised after getting the prepayment VAT percentage from the sales line.

[IntegrationEvent(False,False)]
local procedure OnAfterGetPrepaymentVATPct(var SalesLine: Record "Sales Line"; var PrepaymentVATPct: Decimal)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

PrepaymentVATPct Decimal

The prepayment VAT percentage value.

OnAfterCopyFromVATPostingSetup

Raised after copying values from the VAT posting setup.

[IntegrationEvent(False,False)]
local procedure OnAfterCopyFromVATPostingSetup(var SalesLine: Record "Sales Line"; var VATPostingSetupFrom: Record "VAT Posting Setup")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATPostingSetupFrom Table Microsoft.Finance.VAT.Setup."VAT Posting Setup"

The VAT posting setup to copy from.

OnAfterCopyPrepaymentFromVATPostingSetup

Raised after copying prepayment values from the VAT posting setup.

[IntegrationEvent(False,False)]
local procedure OnAfterCopyPrepaymentFromVATPostingSetup(var SalesLine: Record "Sales Line"; var VATPostingSetupFrom: Record "VAT Posting Setup")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

VATPostingSetupFrom Table Microsoft.Finance.VAT.Setup."VAT Posting Setup"

The VAT posting setup to copy prepayment values from.

OnValidateLineDiscountPercentOnBeforeValidateLineDiscountPercent

Raised before validating the line discount percentage.

[IntegrationEvent(False,False)]
local procedure OnValidateLineDiscountPercentOnBeforeValidateLineDiscountPercent(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var DropInvoiceDiscountAmount: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

DropInvoiceDiscountAmount Boolean

Specifies whether to drop the invoice discount amount.

OnAfterCalcUnitPriceUsingUOMCoef

Raised after calculating the unit price using the unit of measure coefficient.

[IntegrationEvent(False,False)]
local procedure OnAfterCalcUnitPriceUsingUOMCoef(var SalesLine: Record "Sales Line"; SalesInvoiceLine: Record "Sales Invoice Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

SalesInvoiceLine Table Microsoft.Sales.History."Sales Invoice Line"

The sales invoice line used for calculation.

OnInitDeferralCodeOnBeforeUpdateDeferralCode

Raised before updating the deferral code when initializing the deferral code.

[IntegrationEvent(False,False)]
local procedure OnInitDeferralCodeOnBeforeUpdateDeferralCode(var SalesLine: Record "Sales Line"; var ShouldUpdateDeferralCode: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

ShouldUpdateDeferralCode Boolean

Specifies whether the deferral code should be updated.

OnValidateLineDiscountPercentOnBeforeTestJobPlanningLine

Raised before testing the job planning line when validating line discount percentage.

[IntegrationEvent(True,False)]
local procedure OnValidateLineDiscountPercentOnBeforeTestJobPlanningLine(var SalesLine: Record "Sales Line"; xSalesLine: Record "Sales Line"; var IsHandled: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

xSalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line before the change.

IsHandled Boolean

Set to true to skip the default processing.

OnCheckReceiptOrderStatus

Raised when checking the receipt order status for the sales line.

[IntegrationEvent(False,False)]
local procedure OnCheckReceiptOrderStatus(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnAfterInsertOnAfterUpdateDeferralAmounts

Raised after updating deferral amounts during the insert trigger.

[IntegrationEvent(False,False)]
local procedure OnAfterInsertOnAfterUpdateDeferralAmounts(var SalesLine: Record "Sales Line"; CurrFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrFieldNo Integer

The current field number.

OnAfterModifyOnAfterVerifyChangeForSalesLineReserve

Raised after verifying changes for sales line reservation during the modify trigger.

[IntegrationEvent(False,False)]
local procedure OnAfterModifyOnAfterVerifyChangeForSalesLineReserve(var SalesLine: Record "Sales Line"; CurrFieldNo: Integer)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

CurrFieldNo Integer

The current field number.

OnCalcVATAmountLinesOnBeforeGetDeferralAmount

Raised before getting the deferral amount when calculating VAT amount lines.

[IntegrationEvent(False,False)]
local procedure OnCalcVATAmountLinesOnBeforeGetDeferralAmount(var SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

OnBeforeVATRoundingAdjustment

Raised before VAT rounding adjustment to determine if adjustment is required.

[IntegrationEvent(False,False)]
local procedure OnBeforeVATRoundingAdjustment(var SalesLine: Record "Sales Line"; StatusCheckSuspended: Boolean; var RequiresVATRoundingAdjustment: Boolean)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

The sales line being processed.

StatusCheckSuspended Boolean

Specifies whether status check is suspended.

RequiresVATRoundingAdjustment Boolean

Specifies whether VAT rounding adjustment is required.

See also