-
Notifications
You must be signed in to change notification settings - Fork 682
Description
Why do you need this change?
Dear team,
To better align the system with our business requirements, we would like to propose the addition of new events that allow us to manage the standard flow based on custom conditions.
These events would enable us to intercept key processes and apply our own logic before continuing with the default behavior. This flexibility is essential for ensuring that our operational rules are consistently enforced across relevant functions.
Describe the request
On field 5 "No.":
We would like to propose an enhancement to the OnBeforeUpdateLeadTimeFields() event and its associated function. Specifically, we request the addition of the CurrentFieldNo parameter to both the function and the event signature.
This change is necessary to support our business logic, which requires identifying the specific field that triggered the update. By including CurrentFieldNo, we will be able to conditionally manage the update process based on the field context, ensuring more precise control over lead time adjustments.
NEW CODE:
UpdateLeadTimeFields(CurrentFieldNo : Integer)
var
...
begin
...
OnBeforeUpdateLeadTimeFields(Rec, CurrentFieldNo , IsHandled);
...
end

On function CopyFromItem()
We would like to propose an enhancement to the CopyFromItem() function. Specifically, we request the implementation of an IsHandled pattern around the call to PrepaymentMgt.SetPurchPrepaymentPct().
This change would allow us to manage the execution of the prepayment percentage logic based on custom business conditions. By using the IsHandled variant, we can selectively override or bypass the standard behavior when necessary.
NEW CODE:
IsHandled := false;
OnBeforeSetPurchPrepaymentPct(Rec, PurchHeader, IsHandled );
if not IsHandled then

On function CheckApplToItemLedgEntry() Result: Code[10]
We would like to propose an enhancement to the relevant function and its associated event, specifically to support field-level control in our business logic. To achieve this, we request the addition of the CurrentFieldNo parameter to both the function and the event signature.
This change will allow us to identify which field triggered the process and apply conditional logic accordingly, ensuring that our custom rules are executed only when appropriate.
NEW CODE:
OnBeforeCheckApplToItemLedgEntry(Rec, ItemLedgEntry, CurrentFieldNo, IsHandled);

On field 23 "Unit Cost (LCY)":
We would like to propose the addition of a new event to be triggered before the system checks the "Currency Code" field in the "Purchase Header" table. Our business does not require validation of the "Currency Factor" field, and we use a different logic to calculate UnitCostCurrency.
Introducing this event would allow us to implement our custom calculation and bypass the standard flow when necessary, ensuring alignment with our operational requirements.
NEW CODE:
IsHandled := false;
OnBeforeUpdateUnitCostCurrency(Rec, PurchHeader, UnitCostCurrency, IsHandled);
if not IsHandled then
...

We appreciate your consideration and are happy to provide further details on the specific context and conditions involved.
Internal work item: AB#610539