CalculateInventory
CalculateInventory(ItemNo: Code[20]): Decimal
Calculates and returns the web inventory number for a given item number. The calculation takes the Inventory Location Filter setup field into account.If you want to further customize or overrule this calculation please use "NC365 Inventory Events" (codeunit 11260723).
Parameters:
- ItemNo - The Item No. for which you want to calculate.
Returns: The decimal inventory value for this item.
* be aware that additional events are not raised when using the inventory API
CalculateInventory
CalculateInventory(ItemNo: Code[20]; VariantCode: Code[10]): Decimal
Calculates and returns the web inventory number for a given item number + variant code. The calculation takes the Inventory Location Filter setup field into account.If you want to further customize or overrule this calculation please use "NC365 Inventory Events" (codeunit 11260723).
Parameters:
- VariantCode - The Variant Code for which you want to calculate.
- ItemNo - The Item No. for which you want to calculate.
Returns: The decimal inventory value for this item (variant).
* be aware that additional events are not raised when using the inventory API
CalculateInventory
CalculateInventory(ItemNo: Code[20]; VariantCode: Code[10]; RaiseEvents: Boolean): Decimal
Calculates and returns the web inventory number for a given item number + variant code. The calculation takes the Inventory Location Filter setup field into account.If you want to further customize or overrule this calculation please use "NC365 Inventory Events" (codeunit 11260723).
Parameters:
- RaiseEvents - Use false if you want to suppress then OnBeforeCalculateInventory and OnAfterCalculateInventory events.
- VariantCode - The Variant Code for which you want to calculate.
- ItemNo - The Item No. for which you want to calculate.
Returns: The decimal inventory value for this item (variant).
* be aware that additional events are not raised when using the inventory API
UpdateInventory
UpdateInventory(ItemNo: Code[20])
Triggers an inventory (re)calculation for a given item number. This function does the same as CalculateInventory, but does not return a value.If you want to further customize or overrule this calculation please use "NC365 Inventory Events" (codeunit 11260723).
Parameters:
- ItemNo - The Item No. for which you want to calculate.
Returns: void
* be aware that additional events are not raised when using the inventory API
UpdateInventory
UpdateInventory(ItemNo: Code[20]; VariantCode: Code[10])
Triggers an inventory (re)calculation a given item number + variant code. This function does the same as CalculateInventory, but does not return a value.If you want to further customize or overrule this calculation please use "NC365 Inventory Events" (codeunit 11260723).
Parameters:
- VariantCode - The Variant Code for which you want to calculate.
- ItemNo - The Item No. for which you want to calculate.
Returns: void
* be aware that additional events are not raised when using the inventory API
UpdateInventory
UpdateInventory(ItemNo: Code[20]; Inventory: Decimal)
Allows to explicitly set the web inventory for a given item number.
Parameters:
- Inventory - The inventory value.
- ItemNo - The Item No. for which you want set the inventory value.
Returns: void
* be aware that additional events are not raised when using the inventory API
UpdateInventory
UpdateInventory(ItemNo: Code[20]; VariantCode: Code[10]; Inventory: Decimal)
Allows to explicitly set the web inventory for a given item number + variant code.
Parameters:
- Inventory - The inventory value.
- VariantCode - The Variant Code for which you want set the inventory value.
- ItemNo - The Item No. for which you want set the inventory value.
Returns: void
* be aware that additional events are not raised when using the inventory API
RecalculateInventory
RecalculateInventory(IncludeVariants: Boolean)
Triggers a full recalculation of the web inventory for all items, and optionally all variants.If you want to further customize or overrule this calculation please use "NC365 Inventory Events" (codeunit 11260723).
Parameters:
- IncludeVariants - Boolean to indicate whether item variants should be included in the calculation.
Returns: void
* be aware that additional events are not raised when using the inventory API