Share via


Codeunit "Item Subst."

ID 5701
Namespace: Microsoft.Inventory.Item.Substitution

Properties

Name Value
Permissions TableData "Item Substitution" = rimd

Methods

ItemSubstGet

procedure ItemSubstGet(var SalesLine: Record "Sales Line"): Boolean

Parameters

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

Returns

Type Description
Boolean

CalcCustPrice

procedure CalcCustPrice(var TempItemSubstitutions: Record "Item Substitution" temporary, var ItemSubstitution: Record "Item Substitution", var TempSalesLine: Record "Sales Line" temporary)

Parameters

Name Type Description
TempItemSubstitutions Table Microsoft.Inventory.Item.Substitution."Item Substitution"
ItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"
TempSalesLine Table Microsoft.Sales.Document."Sales Line"

ItemServiceSubstGet

Obsolete

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

[Obsolete(Moved to codeunit ServItemSubstitution,25.0)]
procedure ItemServiceSubstGet(var ServiceLine2: Record "Service Line")

Parameters

Name Type Description
ServiceLine2 Table Microsoft.Service.Document."Service Line"

GetCompSubst

Obsolete

This element will become obsolete from version 26.0. Moved to codeunit Mfg. Item Substitution as GetProdOrderCompSubst()

[Obsolete(Moved to codeunit Mfg. Item Substitution as GetProdOrderCompSubst(),26.0)]
procedure GetCompSubst(var ProdOrderComp: Record "Prod. Order Component")

Parameters

Name Type Description
ProdOrderComp Table Microsoft.Manufacturing.Document."Prod. Order Component"

UpdateComponent

Obsolete

This element will become obsolete from version 26.0. Moved to codeunit Mfg. Item Substitution as UpdateProdOrderComp()

[Obsolete(Moved to codeunit Mfg. Item Substitution as UpdateProdOrderComp(),26.0)]
procedure UpdateComponent(var ProdOrderComp: Record "Prod. Order Component", SubstItemNo: Code[20], SubstVariantCode: Code[10])

Parameters

Name Type Description
ProdOrderComp Table Microsoft.Manufacturing.Document."Prod. Order Component"
SubstItemNo Code[20]
SubstVariantCode Code[10]

PrepareSubstList

Obsolete

This element will become obsolete from version 26.0. Replaced by procedure FindItemSubstitutions()

[Obsolete(Replaced by procedure FindItemSubstitutions(),26.0)]
procedure PrepareSubstList(ItemNo: Code[20], VariantCode: Code[10], LocationCode: Code[10], DemandDate: Date, CalcATP: Boolean): Boolean

Parameters

Name Type Description
ItemNo Code[20]
VariantCode Code[10]
LocationCode Code[10]
DemandDate Date
CalcATP Boolean

Returns

Type Description
Boolean

FindItemSubstitutions

procedure FindItemSubstitutions(var TempItemSubstitutions: Record "Item Substitution" temporary, ItemNo: Code[20], VariantCode: Code[10], LocationCode: Code[10], DemandDate: Date, CalcATP: Boolean, var GrossReq: Decimal, var SchedRcpt: Decimal): Boolean

Parameters

Name Type Description
TempItemSubstitutions Table Microsoft.Inventory.Item.Substitution."Item Substitution"
ItemNo Code[20]
VariantCode Code[10]
LocationCode Code[10]
DemandDate Date
CalcATP Boolean
GrossReq Decimal
SchedRcpt Decimal

Returns

Type Description
Boolean

GetTempItemSubstList

Obsolete

This element will become obsolete from version 26.0. Use procedure FindItemSubstitutions with parameters TempItemSubstitutions instead.

[Obsolete(Use procedure FindItemSubstitutions with parameters TempItemSubstitutions instead.,26.0)]
procedure GetTempItemSubstList(var TempItemSubstitutionList: Record "Item Substitution" temporary)

Parameters

Name Type Description
TempItemSubstitutionList Table Microsoft.Inventory.Item.Substitution."Item Substitution"

ErrorMessage

procedure ErrorMessage(ItemNo: Code[20], VariantCode: Code[10])

Parameters

Name Type Description
ItemNo Code[20]
VariantCode Code[10]

ItemAssemblySubstGet

procedure ItemAssemblySubstGet(var AssemblyLine: Record "Assembly Line")

Parameters

Name Type Description
AssemblyLine Table Microsoft.Assembly.Document."Assembly Line"

Events

OnAfterGetCompSubst

Obsolete

This element will become obsolete from version 26.0. Moved to codeunit Mfg. Item Substitution

[Obsolete(Moved to codeunit Mfg. Item Substitution,26.0)]
[IntegrationEvent(False,False)]
local procedure OnAfterGetCompSubst(var ProdOrderComp: Record "Prod. Order Component", var TempItemSubstitution: Record "Item Substitution" temporary)

Parameters

Name Type Description
ProdOrderComp Table Microsoft.Manufacturing.Document."Prod. Order Component"
TempItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"

OnAfterItemSubstGet

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

Parameters

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

OnAfterUpdateComponentBeforeAssign

Obsolete

This element will become obsolete from version 26.0. Moved to codeunit Mfg. Item Substitution

[Obsolete(Moved to codeunit Mfg. Item Substitution,26.0)]
[IntegrationEvent(False,False)]
local procedure OnAfterUpdateComponentBeforeAssign(var ProdOrderComp: Record "Prod. Order Component", var TempProdOrderComp: Record "Prod. Order Component" temporary)

Parameters

Name Type Description
ProdOrderComp Table Microsoft.Manufacturing.Document."Prod. Order Component"
TempProdOrderComp Table Microsoft.Manufacturing.Document."Prod. Order Component"

OnBeforeSaveItemSalesUOM

[IntegrationEvent(False,False)]
local procedure OnBeforeSaveItemSalesUOM(var OldSalesUOM: Code[10], Item: Record Item, var IsHandled: Boolean)

Parameters

Name Type Description
OldSalesUOM Code[10]
Item Table Microsoft.Inventory.Item.Item
IsHandled Boolean

OnBeforeUpdateComponent

Obsolete

This element will become obsolete from version 26.0. Moved to codeunit Mfg. Item Substitution

[Obsolete(Moved to codeunit Mfg. Item Substitution,26.0)]
[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateComponent(var ProdOrderComp: Record "Prod. Order Component", SubstItemNo: Code[20], SubstVariantCode: Code[10], var IsHandled: Boolean)

Parameters

Name Type Description
ProdOrderComp Table Microsoft.Manufacturing.Document."Prod. Order Component"
SubstItemNo Code[20]
SubstVariantCode Code[10]
IsHandled Boolean

OnCalcCustPriceOnAfterCalcQtyAvail

[IntegrationEvent(False,False)]
local procedure OnCalcCustPriceOnAfterCalcQtyAvail(var Item: Record Item, SalesLine: Record "Sales Line", var TempItemSubstitution: Record "Item Substitution" temporary)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
SalesLine Table Microsoft.Sales.Document."Sales Line"
TempItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"

OnCalcCustPriceOnBeforeCalcQtyAvail

[IntegrationEvent(False,False)]
local procedure OnCalcCustPriceOnBeforeCalcQtyAvail(var Item: Record Item, SalesLine: Record "Sales Line", var TempItemSubstitution: Record "Item Substitution" temporary, ItemSubstitution: Record "Item Substitution")

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
SalesLine Table Microsoft.Sales.Document."Sales Line"
TempItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"
ItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"

OnAssemblyCalcCustPriceOnAfterCalcQtyAvail

[IntegrationEvent(False,False)]
local procedure OnAssemblyCalcCustPriceOnAfterCalcQtyAvail(var Item: Record Item, AssemblyLine: Record "Assembly Line", var TempItemSubstitution: Record "Item Substitution" temporary)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
AssemblyLine Table Microsoft.Assembly.Document."Assembly Line"
TempItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"

OnAssemblyCalcCustPriceOnBeforeCalcQtyAvail

[IntegrationEvent(False,False)]
local procedure OnAssemblyCalcCustPriceOnBeforeCalcQtyAvail(var Item: Record Item, AssemblyLine: Record "Assembly Line", var TempItemSubstitution: Record "Item Substitution" temporary)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
AssemblyLine Table Microsoft.Assembly.Document."Assembly Line"
TempItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"

OnBeforeCalcCustPrice

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcCustPrice(var TempItemSubstitution: Record "Item Substitution" temporary, TempSalesLine: Record "Sales Line" temporary, var IsHandled: Boolean, Item: Record Item)

Parameters

Name Type Description
TempItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"
TempSalesLine Table Microsoft.Sales.Document."Sales Line"
IsHandled Boolean
Item Table Microsoft.Inventory.Item.Item

OnBeforeItemSubstGetPopulateTempSalesLine

[IntegrationEvent(False,False)]
local procedure OnBeforeItemSubstGetPopulateTempSalesLine(var TempSalesline: Record "Sales Line" temporary, var TempItemSubstitution: Record "Item Substitution" temporary, var IsHandled: Boolean, SaveItemNo: Code[20], SaveVariantCode: Code[10])

Parameters

Name Type Description
TempSalesline Table Microsoft.Sales.Document."Sales Line"
TempItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"
IsHandled Boolean
SaveItemNo Code[20]
SaveVariantCode Code[10]

OnInsertInSubstServiceListOnAfterCalcQtyAvail

Obsolete

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

[Obsolete(Moved to codeunit ServItemSubstitution,25.0)]
[IntegrationEvent(False,False)]
local procedure OnInsertInSubstServiceListOnAfterCalcQtyAvail(var Item: Record Item, ServiceLine: Record "Service Line", var TempItemSubstitution: Record "Item Substitution" temporary)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
ServiceLine Table Microsoft.Service.Document."Service Line"
TempItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"

OnInsertInSubstServiceListOnBeforeCalcQtyAvail

Obsolete

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

[Obsolete(Moved to codeunit ServItemSubstitution,25.0)]
[IntegrationEvent(False,False)]
local procedure OnInsertInSubstServiceListOnBeforeCalcQtyAvail(var Item: Record Item, ServiceLine: Record "Service Line", var TempItemSubstitution: Record "Item Substitution" temporary)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
ServiceLine Table Microsoft.Service.Document."Service Line"
TempItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"

OnCreateSubstListOnAfterCalcQtyAvail

Obsolete

This element will become obsolete from version 26.0. Replaced by event OnCreateSubstListOnAfterCalcQuantityAvailable

[Obsolete(Replaced by event OnCreateSubstListOnAfterCalcQuantityAvailable,26.0)]
[IntegrationEvent(False,False)]
local procedure OnCreateSubstListOnAfterCalcQtyAvail(var Item: Record Item, ProdOrderComp: Record "Prod. Order Component", var TempItemSubstitution: Record "Item Substitution" temporary)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
ProdOrderComp Table Microsoft.Manufacturing.Document."Prod. Order Component"
TempItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"

OnCreateSubstListOnAfterCalcQuantityAvailable

[IntegrationEvent(False,False)]
local procedure OnCreateSubstListOnAfterCalcQuantityAvailable(var Item: Record Item, var TempItemSubstitution: Record "Item Substitution" temporary)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
TempItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"

OnCreateSubstListOnBeforeCalcQtyAvail

Obsolete

This element will become obsolete from version 26.0. Replaced by event OnCreateSubstListOnBeforeCalcQuantityAvailable

[Obsolete(Replaced by event OnCreateSubstListOnBeforeCalcQuantityAvailable,26.0)]
[IntegrationEvent(False,False)]
local procedure OnCreateSubstListOnBeforeCalcQtyAvail(var Item: Record Item, ProdOrderComp: Record "Prod. Order Component", var TempItemSubstitution: Record "Item Substitution" temporary)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
ProdOrderComp Table Microsoft.Manufacturing.Document."Prod. Order Component"
TempItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"

OnCreateSubstListOnBeforeCalcQuantityAvailable

[IntegrationEvent(False,False)]
local procedure OnCreateSubstListOnBeforeCalcQuantityAvailable(var Item: Record Item, var TempItemSubstitution: Record "Item Substitution" temporary)

Parameters

Name Type Description
Item Table Microsoft.Inventory.Item.Item
TempItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"

OnGetCompSubstOnAfterCheckPrepareSubstList

Obsolete

This element will become obsolete from version 26.0. Moved to codeunit Mfg. Item Substitution

[Obsolete(Moved to codeunit Mfg. Item Substitution,26.0)]
[IntegrationEvent(False,False)]
local procedure OnGetCompSubstOnAfterCheckPrepareSubstList(var ProdOrderComp: Record "Prod. Order Component", var TempItemSubstitution: Record "Item Substitution" temporary, var Item: Record Item, var GrossReq: Decimal, var SchedRcpt: Decimal)

Parameters

Name Type Description
ProdOrderComp Table Microsoft.Manufacturing.Document."Prod. Order Component"
TempItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"
Item Table Microsoft.Inventory.Item.Item
GrossReq Decimal
SchedRcpt Decimal

OnItemSubstGetOnAfterSubstSalesLineItem

[IntegrationEvent(False,False)]
local procedure OnItemSubstGetOnAfterSubstSalesLineItem(var SalesLine: Record "Sales Line", var SourceSalesLine: Record "Sales Line", var TempItemSubstitution: Record "Item Substitution" temporary)

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"
SourceSalesLine Table Microsoft.Sales.Document."Sales Line"
TempItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"

OnItemSubstGetOnAfterItemSubstitutionSetFilters

[IntegrationEvent(False,False)]
local procedure OnItemSubstGetOnAfterItemSubstitutionSetFilters(var ItemSubstitution: Record "Item Substitution")

Parameters

Name Type Description
ItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"

OnItemSubstGetOnAfterTempItemSubstitutionSetFilters

[IntegrationEvent(False,False)]
local procedure OnItemSubstGetOnAfterTempItemSubstitutionSetFilters(var TempItemSubstitution: Record "Item Substitution" temporary, var SalesLine: Record "Sales Line", var TempSalesLine: Record "Sales Line" temporary, OldSalesUOM: Code[10], var IsHandled: Boolean)

Parameters

Name Type Description
TempItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"
SalesLine Table Microsoft.Sales.Document."Sales Line"
TempSalesLine Table Microsoft.Sales.Document."Sales Line"
OldSalesUOM Code[10]
IsHandled Boolean

OnCalcCustPriceOnBeforeTempItemSubstitutionInsert

[IntegrationEvent(False,False)]
local procedure OnCalcCustPriceOnBeforeTempItemSubstitutionInsert(var TempItemSubstitution: Record "Item Substitution" temporary, ItemSubstitution: Record "Item Substitution")

Parameters

Name Type Description
TempItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"
ItemSubstitution Table Microsoft.Inventory.Item.Substitution."Item Substitution"

See also