[Extensibility Request] Add OnAfterIncreaseQty event in Codeunit 99000854 "Inventory Profile Offsetting"
Nobody has claimed this yet.
- Dominant language
- AL
- Stars
- 683
- Forks
- 459
- Avg merge
- 3d 26m
- Merged PRs (30d)
- 633
Description
Describe the issue
We would like to request a new Integration Event at the end of the IncreaseQty procedure in Codeunit 99000854 "Inventory Profile Offsetting".
In our planning scenarios, we need to execute custom logic after the standard quantity increase process has been fully completed and the resulting SupplyInvtProfile has been updated with its final values.
Currently, the available OnBeforeIncreaseQty event allows extensions to influence the process before it is executed, but there is no supported extensibility point that exposes the final state of the SupplyInvtProfile once all standard logic has finished.
Expected behavior
The standard IncreaseQty procedure performs several operations, including:
- Updating Remaining Quantity (Base).
- Updating Untracked Quantity.
- Updating Quantity (Base).
- Updating Action Message values.
- Performing all related quantity calculations.
- Persisting the final values using Modify().
Existing events such as OnBeforeIncreaseQty allow customization before the process is fully completed, 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:
OnAfterIncreaseQty
in the following procedure:
local procedure IncreaseQty(
var SupplyInvtProfile: Record "Inventory Profile";
NeededQty: Decimal;
RespectPlanningParm: Boolean)
Suggested placement
Immediately after the following standard code:
SupplyInvtProfile.Modify();
Suggested publisher
[IntegrationEvent(false, false)]
local procedure OnAfterIncreaseQty(
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 increase 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 quantity increase process has completed.
@rutxy16eyna @Migvazmar @EYN-Jaime @CAS-EYNA @cso-eyna
I will provide a fix for a bug
- I will provide a fix for a bug
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate Codeunit 99000854 "Inventory Profile Offsetting" and its IncreaseQty procedure. Review the existing OnBeforeIncreaseQty event and the point after SupplyInvtProfile.Modify(); the work is done when an OnAfterIncreaseQty integration event exposes the final SupplyInvtProfile state there.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100