IntegrationEvent: OnBeforeCalculateInventory

OnBeforeCalculateInventory(ItemNo: Code[20]; VariantCode: Code[10]; var Inventory: Decimal; var Handled: Boolean)

This event is trigged right before the actual inventory calculation. If you want to either do some prework, or if you want to completely overrule inventory calculation, this is the event to work with.

Parameters:

  • ItemNo - The item number used for calculation
  • VariantCode - The item variant code used for calculation
  • Inventory - If you are going to use Handled is true, then use this decimal to return your inventory value
  • Handled - Indicates that your code has handled the calculation. No further standard processing will take place


IntegrationEvent: OnBeforeCalculateInventoryWithLocation

OnBeforeCalculateInventoryWithLocation(LocationCode: Code[10]; ItemNo: Code[20]; VariantCode: Code[10]; var Inventory: Decimal; var Handled: Boolean)

This event is trigged right before the actual inventory calculation. If you want to either do some prework, or if you want to completely overrule inventory calculation, this is the event to work with.

Parameters:

  • ItemNo - The item number used for calculation
  • VariantCode - The item variant code used for calculation
  • Inventory - If you are going to use Handled is true, then use this decimal to return your inventory value
  • Handled - Indicates that your code has handled the calculation. No further standard processing will take place


IntegrationEvent: OnAfterCalculateInventory

OnAfterCalculateInventory(ItemNo: Code[20]; VariantCode: Code[10]; var Inventory: Decimal)

If you want to manipulate the outcome of the standard inventory calculation, then please use this event.

Parameters:

  • ItemNo - The item number used for calculation
  • VariantCode - The item variant code used for calculation
  • Inventory - The outcome of the standard inventory calculation


IntegrationEvent: OnAfterCalculateInventoryWithLocation

OnAfterCalculateInventoryWithLocation(LocationCode: Code[10]; ItemNo: Code[20]; VariantCode: Code[10]; var Inventory: Decimal)

If you want to manipulate the outcome of the standard inventory calculation, then please use this event.

Parameters:

  • ItemNo - The item number used for calculation
  • VariantCode - The item variant code used for calculation
  • Inventory - The outcome of the standard inventory calculation