Describe the issue
We would like to request a new Integration Event at the end of the DecreaseQty procedure in Codeunit 99000854 "Inventory Profile Offsetting".
In our planning scenarios, we need to execute custom logic after the standard quantity decrease process has been fully completed and the resulting supply inventory profile has been updated and modified.
Currently, the available OnBeforeDecreaseQty event allows extensions to influence or override the process before it is executed, but there is no supported extensibility point that exposes the final state of the SupplyInvtProfile once all standard decrease logic has finished.
Expected behavior
The standard DecreaseQty procedure performs several operations, including:
- Validating whether the supply can be decreased.
- Applying quantity adjustments according to planning parameters.
- Updating action messages.
- Recalculating quantities.
- Modifying the SupplyInvtProfile record.
- Returning a Boolean value that indicates whether the supply has been fully consumed.
Existing events such as: OnBeforeDecreaseQty allow customization before the process is executed, but they do not provide access to the final result after all standard processing has finished.
Without this event, the available alternatives are:
- Duplicating or replacing parts of the standard planning logic.
- Executing custom logic before the final state is available.
- Modifying standard application code.
These approaches increase maintenance effort, upgrade costs, and implementation complexity.
Steps to reproduce
Suggested solution
Add a new Integration Event named:
OnAfterDecreaseQty
in the following procedure:
procedure DecreaseQty(
var SupplyInvtProfile: Record "Inventory Profile";
ReduceQty: Decimal;
RespectPlanningParm: Boolean): Boolean
Suggested placement
Immediately after the following standard code:
SupplyInvtProfile.Modify();
and before the final return statement:
exit(SupplyInvtProfile."Untracked Quantity" = 0);
Suggested publisher
[IntegrationEvent(false, false)]
local procedure OnAfterDecreaseQty(
var SupplyInvtProfile: Record "Inventory Profile")
begin
end;
Additional context
Business impact
This event would allow extensions to react to the final result of the quantity decrease process using a supported extensibility pattern, avoiding modifications to standard application code.
It would simplify planning-related customizations, reduce upgrade effort, and improve maintainability for partners and customers implementing advanced planning and replenishment scenarios.
In addition, the event could be beneficial for other Business Central implementations that require post-processing logic once the standard supply quantity decrease process has completed.
@rutxy16eyna @Migvazmar @EYN-Jaime @CAS-EYNA @cso-eyna
I will provide a fix for a bug
Describe the issue
We would like to request a new Integration Event at the end of the
DecreaseQtyprocedure in Codeunit 99000854 "Inventory Profile Offsetting".In our planning scenarios, we need to execute custom logic after the standard quantity decrease process has been fully completed and the resulting supply inventory profile has been updated and modified.
Currently, the available
OnBeforeDecreaseQtyevent allows extensions to influence or override the process before it is executed, but there is no supported extensibility point that exposes the final state of theSupplyInvtProfileonce all standard decrease logic has finished.Expected behavior
The standard
DecreaseQtyprocedure performs several operations, including:Existing events such as:
OnBeforeDecreaseQtyallow customization before the process is executed, but they do not provide access to the final result after all standard processing has finished.Without this event, the available alternatives are:
These approaches increase maintenance effort, upgrade costs, and implementation complexity.
Steps to reproduce
Add a new Integration Event named:
OnAfterDecreaseQtyin the following procedure:
Immediately after the following standard code:
SupplyInvtProfile.Modify();and before the final return statement:
exit(SupplyInvtProfile."Untracked Quantity" = 0);Additional context
This event would allow extensions to react to the final result of the quantity decrease process using a supported extensibility pattern, avoiding modifications to standard application code.
It would simplify planning-related customizations, reduce upgrade effort, and improve maintainability for partners and customers implementing advanced planning and replenishment scenarios.
In addition, the event could be beneficial for other Business Central implementations that require post-processing logic once the standard supply quantity decrease process has completed.
@rutxy16eyna @Migvazmar @EYN-Jaime @CAS-EYNA @cso-eyna
I will provide a fix for a bug