Share via


Codeunit AvailabilityManagement

ID 99000889
Namespace: Microsoft.Inventory.Availability

Properties

Name Value
Permissions TableData "Order Promising Line" = rimd

Methods

GetCaption

procedure GetCaption(): Text

Returns

Type Description
Text

SetSourceRecord

procedure SetSourceRecord(var OrderPromisingLine: Record "Order Promising Line", SourceRecordVar: Variant)

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"
SourceRecordVar Variant

SetSalesHeader

Obsolete

This element will become obsolete from version 25.0. Moved to codeunit ServAvailabilityMgt

[Obsolete(Moved to codeunit ServAvailabilityMgt,25.0)]
procedure SetSalesHeader(var OrderPromisingLine: Record "Order Promising Line", var SalesHeader: Record "Sales Header")

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"
SalesHeader Table Microsoft.Sales.Document."Sales Header"

SetServHeader

Obsolete

This element will become obsolete from version 25.0. Moved to codeunit ServAvailabilityMgt

[Obsolete(Moved to codeunit ServAvailabilityMgt,25.0)]
procedure SetServHeader(var OrderPromisingLine: Record "Order Promising Line", var ServHeader: Record "Service Header")

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"
ServHeader Table Microsoft.Service.Document."Service Header"

SetJob

Obsolete

This element will become obsolete from version 25.0. Moved to codeunit JobPlanningAvailabilityMgt

[Obsolete(Moved to codeunit JobPlanningAvailabilityMgt,25.0)]
procedure SetJob(var OrderPromisingLine: Record "Order Promising Line", var Job: Record Job)

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"
Job Table Microsoft.Projects.Project.Job.Job

CalcAvailableQty

procedure CalcAvailableQty(var OrderPromisingLine: Record "Order Promising Line"): Decimal

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"

Returns

Type Description
Decimal

CalcCapableToPromise

procedure CalcCapableToPromise(var OrderPromisingLine: Record "Order Promising Line", var OrderPromisingID: Code[20])

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"
OrderPromisingID Code[20]

CalcAvailableToPromise

procedure CalcAvailableToPromise(var OrderPromisingLine: Record "Order Promising Line")

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"

UpdateSource

procedure UpdateSource(var OrderPromisingLine: Record "Order Promising Line")

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"

CancelReservations

procedure CancelReservations()

Events

OnAfterCaseCalcCapableToPromise

[IntegrationEvent(False,False)]
local procedure OnAfterCaseCalcCapableToPromise(var OrderPromisingLine: Record "Order Promising Line", var CompanyInfo: Record "Company Information", var OrderPromisingID: Code[20], var LastValidLine: Integer)

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"
CompanyInfo Table Microsoft.Foundation.Company."Company Information"
OrderPromisingID Code[20]
LastValidLine Integer

OnAfterUpdateSourceLine

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateSourceLine(var OrderPromisingLine2: Record "Order Promising Line")

Parameters

Name Type Description
OrderPromisingLine2 Table Microsoft.Inventory.Availability."Order Promising Line"

OnBeforeOrderPromisingLineInsert

[IntegrationEvent(False,False)]
local procedure OnBeforeOrderPromisingLineInsert(var OrderPromisingLine: Record "Order Promising Line")

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"

OnCalcAvailableToPromiseLineOnAfterSetFilters

[IntegrationEvent(False,False)]
local procedure OnCalcAvailableToPromiseLineOnAfterSetFilters(var Item: Record Item, var OrderPromisingLine: Record "Order Promising Line")

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"

OnCalcAvailableToPromiseLineOnBeforeModify

[IntegrationEvent(False,False)]
local procedure OnCalcAvailableToPromiseLineOnBeforeModify(var OrderPromisingLine: Record "Order Promising Line")

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"

OnCreateReservationsAfterFirstCASE

[IntegrationEvent(False,False)]
local procedure OnCreateReservationsAfterFirstCASE(var OrderPromisingLine: Record "Order Promising Line", var NeededQty: Decimal, var NeededQtyBase: Decimal)

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"
NeededQty Decimal
NeededQtyBase Decimal

OnCreateReservationsAfterSecondCASE

[IntegrationEvent(False,False)]
local procedure OnCreateReservationsAfterSecondCASE(var OrderPromisingLine: Record "Order Promising Line", var ReqLine: Record "Requisition Line", var ReservQty: Decimal, var ReservQtyBase: Decimal)

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"
ReqLine Table Microsoft.Inventory.Requisition."Requisition Line"
ReservQty Decimal
ReservQtyBase Decimal

OnBeforeCalcCapableToPromise

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcCapableToPromise(var OrderPromisingLine: Record "Order Promising Line", var CompanyInformation: Record "Company Information", var OrderPromisingID: Code[20], var LastValidLine: Integer, var IsHandled: Boolean)

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"
CompanyInformation Table Microsoft.Foundation.Company."Company Information"
OrderPromisingID Code[20]
LastValidLine Integer
IsHandled Boolean

OnSetSourceRecord

[IntegrationEvent(True,False)]
local procedure OnSetSourceRecord(var OrderPromisingLine: Record "Order Promising Line", TableID: Integer, var SourceRecordVar: Variant, var CaptionText: Text)

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"
TableID Integer
SourceRecordVar Variant
CaptionText Text

OnCalcCapableToPromiseLine

[IntegrationEvent(False,False)]
local procedure OnCalcCapableToPromiseLine(var OrderPromisingLine: Record "Order Promising Line", var CompanyInfo: Record "Company Information", var OrderPromisingID: Code[20], var LastValidLine: Integer)

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"
CompanyInfo Table Microsoft.Foundation.Company."Company Information"
OrderPromisingID Code[20]
LastValidLine Integer

OnGetRequestedDeliveryDate

[IntegrationEvent(False,False)]
local procedure OnGetRequestedDeliveryDate(var OrderPromisingLine: Record "Order Promising Line", var RequestedDeliveryDate: Date)

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"
RequestedDeliveryDate Date

OnUpdateSourceLine

[IntegrationEvent(False,False)]
local procedure OnUpdateSourceLine(var OrderPromisingLine: Record "Order Promising Line")

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"

OnCreateReservationsOnCalcNeededQuantity

[IntegrationEvent(False,False)]
local procedure OnCreateReservationsOnCalcNeededQuantity(var OrderPromisingLine: Record "Order Promising Line", var NeededQty: Decimal, var NeededQtyBase: Decimal)

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"
NeededQty Decimal
NeededQtyBase Decimal

OnCreateReservationsOnBindToTracking

[IntegrationEvent(False,False)]
local procedure OnCreateReservationsOnBindToTracking(var OrderPromisingLine: Record "Order Promising Line", ReqLine: Record "Requisition Line", ReservQty: Decimal, ReservQtyBase: Decimal, var TempRecordBuffer: Record "Record Buffer" temporary)

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"
ReqLine Table Microsoft.Inventory.Requisition."Requisition Line"
ReservQty Decimal
ReservQtyBase Decimal
TempRecordBuffer Table System.IO."Record Buffer"

OnCancelReservations

[IntegrationEvent(False,False)]
local procedure OnCancelReservations(var TempRecordBuffer: Record "Record Buffer" temporary)

Parameters

Name Type Description
TempRecordBuffer Table System.IO."Record Buffer"

OnAfterShouldCalculateAvailableToPromise

[IntegrationEvent(False,False)]
local procedure OnAfterShouldCalculateAvailableToPromise(var OrderPromisingLine: Record "Order Promising Line", var ShouldCalculate: Boolean)

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"
ShouldCalculate Boolean

OnCalcAvailableToPromiseLineOnAfterSetOriginalShipmentDate

[IntegrationEvent(False,False)]
local procedure OnCalcAvailableToPromiseLineOnAfterSetOriginalShipmentDate(var OrderPromisingLine: Record "Order Promising Line", Item: Record Item, CompanyInformation: Record "Company Information", var AvailableToPromise: Codeunit "Available to Promise")

Parameters

Name Type Description
OrderPromisingLine Table Microsoft.Inventory.Availability."Order Promising Line"
Item Table Microsoft.Inventory.Item.Item
CompanyInformation Table Microsoft.Foundation.Company."Company Information"
AvailableToPromise Codeunit Microsoft.Inventory.Availability."Available to Promise"

OnAfterCalcCapableToPromise

[IntegrationEvent(False,False)]
local procedure OnAfterCalcCapableToPromise(OrderPromisingID: Code[20])

Parameters

Name Type Description
OrderPromisingID Code[20]

See also