NC365 Inventory Events (11260723)

Created by Tys van den Heuvel, Modified on Wed, 26 Oct, 2022 at 2:22 PM by Tys van den Heuvel

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


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article