Share via


Codeunit "Purch. Line-Reserve"

ID 99000834
Namespace: Microsoft.Purchases.Document

Properties

Name Value
Permissions TableData "Reservation Entry" = rimd

Methods

CreateReservation

procedure CreateReservation(var PurchaseLine: Record "Purchase Line", Description: Text[100], ExpectedReceiptDate: Date, Quantity: Decimal, QuantityBase: Decimal, ForReservationEntry: Record "Reservation Entry")

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
Description Text[100]
ExpectedReceiptDate Date
Quantity Decimal
QuantityBase Decimal
ForReservationEntry Table Microsoft.Inventory.Tracking."Reservation Entry"

CreateReservationSetFrom

procedure CreateReservationSetFrom(TrackingSpecification: Record "Tracking Specification")

Parameters

Name Type Description
TrackingSpecification Table Microsoft.Inventory.Tracking."Tracking Specification"

ReservQuantity

procedure ReservQuantity(PurchaseLine: Record "Purchase Line"): Decimal

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

Returns

Type Description
Decimal

Caption

procedure Caption(PurchaseLine: Record "Purchase Line"): Text

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

Returns

Type Description
Text

FindReservEntry

procedure FindReservEntry(PurchaseLine: Record "Purchase Line", var ReservationEntry: Record "Reservation Entry"): Boolean

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
ReservationEntry Table Microsoft.Inventory.Tracking."Reservation Entry"

Returns

Type Description
Boolean

GetReservedQtyFromInventory

procedure GetReservedQtyFromInventory(PurchaseLine: Record "Purchase Line"): Decimal

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

Returns

Type Description
Decimal

GetReservedQtyFromInventory

procedure GetReservedQtyFromInventory(PurchaseHeader: Record "Purchase Header"): Decimal

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"

Returns

Type Description
Decimal

ReservEntryExist

procedure ReservEntryExist(PurchaseLine: Record "Purchase Line"): Boolean

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

Returns

Type Description
Boolean

VerifyChange

procedure VerifyChange(var NewPurchaseLine: Record "Purchase Line", var OldPurchaseLine: Record "Purchase Line")

Parameters

Name Type Description
NewPurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
OldPurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

VerifyQuantity

procedure VerifyQuantity(var NewPurchaseLine: Record "Purchase Line", var OldPurchaseLine: Record "Purchase Line")

Parameters

Name Type Description
NewPurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
OldPurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

UpdatePlanningFlexibility

procedure UpdatePlanningFlexibility(var PurchaseLine: Record "Purchase Line")

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

TransferPurchLineToItemJnlLine

procedure TransferPurchLineToItemJnlLine(var PurchaseLine: Record "Purchase Line", var ItemJournalLine: Record "Item Journal Line", TransferQty: Decimal, var CheckApplToItemEntry: Boolean): Decimal

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
ItemJournalLine Table Microsoft.Inventory.Journal."Item Journal Line"
TransferQty Decimal
CheckApplToItemEntry Boolean

Returns

Type Description
Decimal

TransferPurchLineToPurchLine

procedure TransferPurchLineToPurchLine(var OldPurchaseLine: Record "Purchase Line", var NewPurchaseLine: Record "Purchase Line", TransferQty: Decimal)

Parameters

Name Type Description
OldPurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
NewPurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
TransferQty Decimal

DeleteLineConfirm

procedure DeleteLineConfirm(var PurchaseLine: Record "Purchase Line"): Boolean

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

Returns

Type Description
Boolean

DeleteLine

procedure DeleteLine(var PurchaseLine: Record "Purchase Line")

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

Block

procedure Block(SetBlocked: Boolean)

Parameters

Name Type Description
SetBlocked Boolean

CallItemTracking

procedure CallItemTracking(var PurchaseLine: Record "Purchase Line")

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

CallItemTracking

procedure CallItemTracking(var PurchaseLine: Record "Purchase Line", SecondSourceQuantityArray: array[3] of Decimal)

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
SecondSourceQuantityArray array[3] of Decimal

RetrieveInvoiceSpecification

procedure RetrieveInvoiceSpecification(var PurchaseLine: Record "Purchase Line", var TempInvoicingTrackingSpecification: Record "Tracking Specification" temporary): Boolean

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
TempInvoicingTrackingSpecification Table Microsoft.Inventory.Tracking."Tracking Specification"

Returns

Type Description
Boolean

RetrieveInvoiceSpecification2

procedure RetrieveInvoiceSpecification2(var PurchaseLine: Record "Purchase Line", var TempInvoicingTrackingSpecification: Record "Tracking Specification" temporary): Boolean

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
TempInvoicingTrackingSpecification Table Microsoft.Inventory.Tracking."Tracking Specification"

Returns

Type Description
Boolean

DeleteInvoiceSpecFromHeader

procedure DeleteInvoiceSpecFromHeader(PurchaseHeader: Record "Purchase Header")

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"

DeleteInvoiceSpecFromLine

procedure DeleteInvoiceSpecFromLine(PurchaseLine: Record "Purchase Line")

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

UpdateItemTrackingAfterPosting

procedure UpdateItemTrackingAfterPosting(PurchaseHeader: Record "Purchase Header")

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"

SetApplySpecificItemTracking

procedure SetApplySpecificItemTracking(ApplySpecific: Boolean)

Parameters

Name Type Description
ApplySpecific Boolean

SetOverruleItemTracking

procedure SetOverruleItemTracking(Overrule: Boolean)

Parameters

Name Type Description
Overrule Boolean

InitFromPurchLine

procedure InitFromPurchLine(var TransactionSpecification: Record "Tracking Specification", PurchLine: Record "Purchase Line")

Parameters

Name Type Description
TransactionSpecification Table Microsoft.Inventory.Tracking."Tracking Specification"
PurchLine Table Microsoft.Purchases.Document."Purchase Line"

Events

OnVerifyChangeOnBeforeHasError

[IntegrationEvent(False,False)]
local procedure OnVerifyChangeOnBeforeHasError(NewPurchLine: Record "Purchase Line", OldPurchLine: Record "Purchase Line", var HasError: Boolean, var ShowError: Boolean)

Parameters

Name Type Description
NewPurchLine Table Microsoft.Purchases.Document."Purchase Line"
OldPurchLine Table Microsoft.Purchases.Document."Purchase Line"
HasError Boolean
ShowError Boolean

OnAfterUpdateItemTrackingAfterPosting

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateItemTrackingAfterPosting(var PurchHeader: Record "Purchase Header")

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"

OnBeforeCreateReservation

[IntegrationEvent(False,False)]
local procedure OnBeforeCreateReservation(var PurchLine: Record "Purchase Line")

Parameters

Name Type Description
PurchLine Table Microsoft.Purchases.Document."Purchase Line"

OnBeforeDeleteLine

[IntegrationEvent(False,False)]
local procedure OnBeforeDeleteLine(var PurchaseLine: Record "Purchase Line", var IsHandled: Boolean)

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
IsHandled Boolean

OnBeforeTransferPurchLineToItemJnlLine

[IntegrationEvent(False,False)]
local procedure OnBeforeTransferPurchLineToItemJnlLine(var PurchaseLine: Record "Purchase Line", var ItemJournalLine: Record "Item Journal Line", TransferQty: Decimal, var CheckApplToItemEntry: Boolean, var Result: Decimal, var IsHandled: Boolean)

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
ItemJournalLine Table Microsoft.Inventory.Journal."Item Journal Line"
TransferQty Decimal
CheckApplToItemEntry Boolean
Result Decimal
IsHandled Boolean

OnBeforeTransferPurchLineToItemJnlLineReservEntry

[IntegrationEvent(False,False)]
local procedure OnBeforeTransferPurchLineToItemJnlLineReservEntry(var OldReservEntry: Record "Reservation Entry", PurchLine: Record "Purchase Line", ItemJnlLine: Record "Item Journal Line", var TransferQty: Decimal, var IsHandled: Boolean)

Parameters

Name Type Description
OldReservEntry Table Microsoft.Inventory.Tracking."Reservation Entry"
PurchLine Table Microsoft.Purchases.Document."Purchase Line"
ItemJnlLine Table Microsoft.Inventory.Journal."Item Journal Line"
TransferQty Decimal
IsHandled Boolean

OnBeforeRunItemTrackingLinesPage

[IntegrationEvent(False,False)]
local procedure OnBeforeRunItemTrackingLinesPage(var ItemTrackingLines: Page "Item Tracking Lines", var IsHandled: Boolean)

Parameters

Name Type Description
ItemTrackingLines Page Microsoft.Inventory.Tracking."Item Tracking Lines"
IsHandled Boolean

OnBeforeVerifyQuantity

[IntegrationEvent(False,False)]
local procedure OnBeforeVerifyQuantity(PurchaseLine: Record "Purchase Line", var IsHandled: Boolean, OldPurchaseLine: Record "Purchase Line")

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
IsHandled Boolean
OldPurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

OnTransferPurchLineToPurchLineOnAfterOldReservEntrySetFilters

[IntegrationEvent(False,False)]
local procedure OnTransferPurchLineToPurchLineOnAfterOldReservEntrySetFilters(var OldPurchLine: Record "Purchase Line", var NewPurchLine: Record "Purchase Line")

Parameters

Name Type Description
OldPurchLine Table Microsoft.Purchases.Document."Purchase Line"
NewPurchLine Table Microsoft.Purchases.Document."Purchase Line"

OnTransferPurchLineToItemJnlLineOnBeforeInitRecordSet

[IntegrationEvent(False,False)]
local procedure OnTransferPurchLineToItemJnlLineOnBeforeInitRecordSet(var OldReservationEntry: Record "Reservation Entry")

Parameters

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

OnVerifyChangeOnBeforeTestVariantCode

[IntegrationEvent(False,False)]
local procedure OnVerifyChangeOnBeforeTestVariantCode(var NewPurchaseLine: Record "Purchase Line", var OldPurchaseLine: Record "Purchase Line", var IsHandled: Boolean)

Parameters

Name Type Description
NewPurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
OldPurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
IsHandled Boolean

OnCallItemTrackingOnBeforeItemTrackingFormRunModal

[IntegrationEvent(False,False)]
local procedure OnCallItemTrackingOnBeforeItemTrackingFormRunModal(var PurchLine: Record "Purchase Line", var ItemTrackingForm: Page "Item Tracking Lines")

Parameters

Name Type Description
PurchLine Table Microsoft.Purchases.Document."Purchase Line"
ItemTrackingForm Page Microsoft.Inventory.Tracking."Item Tracking Lines"

OnRetrieveInvoiceSpecification2OnBeforeInsert

[IntegrationEvent(False,False)]
local procedure OnRetrieveInvoiceSpecification2OnBeforeInsert(var TempInvoicingSpecification: Record "Tracking Specification" temporary, ReservEntry: Record "Reservation Entry")

Parameters

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

OnUpdateStatisticsOnBeforeCheckSpecialOrder

[IntegrationEvent(False,False)]
local procedure OnUpdateStatisticsOnBeforeCheckSpecialOrder(var PurchLine: Record "Purchase Line")

Parameters

Name Type Description
PurchLine Table Microsoft.Purchases.Document."Purchase Line"

OnBeforeAssignForPlanning

[IntegrationEvent(False,False)]
local procedure OnBeforeAssignForPlanning(PurchaseLine: Record "Purchase Line", var IsHandled: Boolean)

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
IsHandled Boolean

OnBeforeRetrieveInvoiceSpecification

[IntegrationEvent(True,False)]
local procedure OnBeforeRetrieveInvoiceSpecification(PurchaseLine: Record "Purchase Line", var IsHandled: Boolean, var OK: Boolean, var TempInvoicingSpecification: Record "Tracking Specification" temporary)

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
IsHandled Boolean
OK Boolean
TempInvoicingSpecification Table Microsoft.Inventory.Tracking."Tracking Specification"

OnBeforeRetrieveInvoiceSpecification2

[IntegrationEvent(False,False)]
local procedure OnBeforeRetrieveInvoiceSpecification2(PurchaseLine: Record "Purchase Line", var IsHandled: Boolean)

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
IsHandled Boolean

OnCreateReservationOnBeforeCreateReservEntry

[IntegrationEvent(False,False)]
local procedure OnCreateReservationOnBeforeCreateReservEntry(var PurchLine: Record "Purchase Line", var Quantity: Decimal, var QuantityBase: Decimal, var ForReservEntry: Record "Reservation Entry", var IsHandled: Boolean, var FromTrackingSpecification: Record "Tracking Specification", ExpectedReceiptDate: Date, var Description: Text[100], ShipmentDate: Date)

Parameters

Name Type Description
PurchLine Table Microsoft.Purchases.Document."Purchase Line"
Quantity Decimal
QuantityBase Decimal
ForReservEntry Table Microsoft.Inventory.Tracking."Reservation Entry"
IsHandled Boolean
FromTrackingSpecification Table Microsoft.Inventory.Tracking."Tracking Specification"
ExpectedReceiptDate Date
Description Text[100]
ShipmentDate Date

OnCallItemTrackingOnAfterCalcShouldProcessDropShipment

[IntegrationEvent(False,False)]
local procedure OnCallItemTrackingOnAfterCalcShouldProcessDropShipment(var PurchLine: Record "Purchase Line", var ShouldProcessDropShipment: Boolean, var ItemTrackingLinesPage: Page "Item Tracking Lines")

Parameters

Name Type Description
PurchLine Table Microsoft.Purchases.Document."Purchase Line"
ShouldProcessDropShipment Boolean
ItemTrackingLinesPage Page Microsoft.Inventory.Tracking."Item Tracking Lines"

OnAfterCreateReservation

[IntegrationEvent(False,False)]
local procedure OnAfterCreateReservation(var PurchaseLine: Record "Purchase Line")

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

OnBeforeCallItemTracking

[IntegrationEvent(False,False)]
local procedure OnBeforeCallItemTracking(var PurchaseLine: Record "Purchase Line", var IsHandled: Boolean)

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
IsHandled Boolean

OnAfterReservQuantity

[IntegrationEvent(False,False)]
local procedure OnAfterReservQuantity(PurchaseLine: Record "Purchase Line", var QtyToReserve: Decimal)

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
QtyToReserve Decimal

OnBeforeVerifyChange

[IntegrationEvent(False,False)]
local procedure OnBeforeVerifyChange(var NewPurchaseLine: Record "Purchase Line", var OldPurchaseLine: Record "Purchase Line", var IsHandled: Boolean)

Parameters

Name Type Description
NewPurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
OldPurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
IsHandled Boolean

OnBeforeAutoReservePurchLine

[IntegrationEvent(False,False)]
local procedure OnBeforeAutoReservePurchLine(ReservSummEntryNo: Integer, var RemainingQtyToReserve: Decimal, var RemainingQtyToReserveBase: Decimal, Description: Text[100], AvailabilityDate: Date, var IsReserved: Boolean, var Search: Text[1], var NextStep: Integer, CalcReservEntry: Record "Reservation Entry")

Parameters

Name Type Description
ReservSummEntryNo Integer
RemainingQtyToReserve Decimal
RemainingQtyToReserveBase Decimal
Description Text[100]
AvailabilityDate Date
IsReserved Boolean
Search Text[1]
NextStep Integer
CalcReservEntry Table Microsoft.Inventory.Tracking."Reservation Entry"

OnAutoReservePurchLineOnBeforeSetQtyToReserveDownToTrackedQuantity

[IntegrationEvent(False,False)]
local procedure OnAutoReservePurchLineOnBeforeSetQtyToReserveDownToTrackedQuantity(PurchLine: Record "Purchase Line", CalcReservEntry: Record "Reservation Entry", var ReservQty: Decimal, var QtyThisLine: Decimal, var QtyThisLineBase: Decimal)

Parameters

Name Type Description
PurchLine Table Microsoft.Purchases.Document."Purchase Line"
CalcReservEntry Table Microsoft.Inventory.Tracking."Reservation Entry"
ReservQty Decimal
QtyThisLine Decimal
QtyThisLineBase Decimal

OnAfterAutoReservePurchLine

[IntegrationEvent(False,False)]
local procedure OnAfterAutoReservePurchLine(var PurchLine: Record "Purchase Line", ReservSummEntryNo: Integer, var RemainingQtyToReserve: Decimal, var RemainingQtyToReserveBase: Decimal, Description: Text[100], AvailabilityDate: Date)

Parameters

Name Type Description
PurchLine Table Microsoft.Purchases.Document."Purchase Line"
ReservSummEntryNo Integer
RemainingQtyToReserve Decimal
RemainingQtyToReserveBase Decimal
Description Text[100]
AvailabilityDate Date

OnSetSourceForReservationOnBeforeUpdateReservation

Obsolete

This element will become obsolete from version 27.0. This event is never raised.

[Obsolete(This event is never raised.,27.0)]
[IntegrationEvent(False,False)]
local procedure OnSetSourceForReservationOnBeforeUpdateReservation(var ReservEntry: Record "Reservation Entry", PurchLine: Record "Purchase Line")

Parameters

Name Type Description
ReservEntry Table Microsoft.Inventory.Tracking."Reservation Entry"
PurchLine Table Microsoft.Purchases.Document."Purchase Line"

OnAfterInitFromPurchLine

[IntegrationEvent(False,False)]
local procedure OnAfterInitFromPurchLine(var TrackingSpecification: Record "Tracking Specification", PurchaseLine: Record "Purchase Line")

Parameters

Name Type Description
TrackingSpecification Table Microsoft.Inventory.Tracking."Tracking Specification"
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

See also