Why do you need this change?
Hi Microsoft AL Dev Team,
We would like to request a new integration event to allow skipping the standard sales order line update logic when posting a Sales Return Order from the Sales-Post codeunit.
Currently, the UpdateSalesOrderLineIfExist function runs during the posting process. In our scenario, this is causing unexpected behaviour when a return order is applied to a sales order with prepayments, as the prepayment amounts are updated back to the open sales order.
We would like to handle this process with custom logic in our app, but there is currently no extensibility point available to bypass this behaviour.
Other considerations
- Execution frequency / performance impact: Minimal. This would only apply when posting Sales Return Orders that are applied to sales orders with prepayments.
- Sensitive data exposure assessment: Not applicable.
- Multiple-subscriber conflict considerations: Minimal. The event would primarily be used by extensions that need to replace the standard update logic.
Describe the request
We would like the new event at the start of the UpdateSalesOrderLineIfExist function in codeunit 80 "Sales-Post" with ability to skip the function with a IsHandled boolean.
[IntegrationEvent(false, false)]
local procedure OnBeforeUpdateSalesOrderLineIfExist(DocumentNo: Code[20]; var IsHandled: Boolean)
begin
end;
Specific location within the codeunit:

Why do you need this change?
Hi Microsoft AL Dev Team,
We would like to request a new integration event to allow skipping the standard sales order line update logic when posting a Sales Return Order from the Sales-Post codeunit.
Currently, the
UpdateSalesOrderLineIfExistfunction runs during the posting process. In our scenario, this is causing unexpected behaviour when a return order is applied to a sales order with prepayments, as the prepayment amounts are updated back to the open sales order.We would like to handle this process with custom logic in our app, but there is currently no extensibility point available to bypass this behaviour.
Other considerations
Describe the request
We would like the new event at the start of the
UpdateSalesOrderLineIfExistfunction in codeunit 80 "Sales-Post" with ability to skip the function with a IsHandled boolean.Specific location within the codeunit: