You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 19, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 19, 2026. It is now read-only.
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;
alternatives_evaluated: Please explain which existing events or extensibility patterns you evaluated in the current Sales-Post extensibility surface, what was tried or reviewed, and why those options are insufficient for this scenario instead of introducing a new IsHandled event.
Please update the issue with the missing details. We'll automatically re-analyze once updated.
Note
Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
Tip
Not accurate? Reply with /not-accurate (optional: add a short explanation). Your feedback improves future responses.
alternatives_evaluated: We have evaluated other option but there's no other event to bypass this function. This occurs at the very end in the Sales-Post codeunit and affects open sales prepayment orders.
alternatives_evaluated: Please explain why the existing event OnBeforeUpdateSalesOrderLinesFromCreditMemo(var SalesInvoiceLine; var SalesCrMemoLine; var IsHandled) in the Correct Posted Sales Invoice flow is insufficient for your return-order/prepayment scenario.
custom_logic_consistency: Please confirm that if UpdateSalesOrderLineIfExist is skipped, your custom logic will preserve the required downstream sales order line update/modify consistency for the open sales order.
Please update the issue with the missing details. We'll automatically re-analyze once updated.
Note
Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
Tip
Not accurate? Reply with /not-accurate (optional: add a short explanation). Your feedback improves future responses.
alternatives_evaluated: The existing event OnBeforeUpdateSalesOrderLinesFromCreditMemo(var SalesInvoiceLine; var SalesCrMemoLine; var IsHandled) is in an internal function that could be called else where within the base application. More specifically, it doesn't know the context that it's called from a return order posting. And therefore, we want an event within the Sales-Post codeunit itself to handle during posting of return orders with prepayments.
custom_logic_consistency: Yes, we will consider this.
✅ Analysis complete - ready for further processing
Implementation:
Add a new OnBeforeUpdateSalesOrderLineIfExist(DocumentNo: Code[20]; var IsHandled: Boolean) integration event at the start of UpdateSalesOrderLineIfExist in codeunit 80 Sales-Post so extensions can skip the standard sales order line update logic.
Location in UpdateSalesOrderLineIfExist procedure:
localprocedure UpdateSalesOrderLineIfExist(DocumentNo: Code[20])var
SalesCreditMemoHeader: Record "Sales Cr.Memo Header";
CorrectPostedSalesInvoice: Codeunit "Correct Posted Sales Invoice";
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeUpdateSalesOrderLineIfExist(DocumentNo, IsHandled);
if IsHandled thenexit;
SalesCreditMemoHeader.SetLoadFields("Return Order No.", "No.");
SalesCreditMemoHeader.SetRange("Return Order No.", DocumentNo);
if SalesCreditMemoHeader.FindFirst() then
CorrectPostedSalesInvoice.UpdateSalesOrderLineIfExist(SalesCreditMemoHeader."No.");
end;
Event Publisher (add at the end of the codeunit with other events):
[IntegrationEvent(false, false)]
localprocedure OnBeforeUpdateSalesOrderLineIfExist(DocumentNo: Code[20]; var IsHandled: Boolean)beginend;
File:SalesPost.Codeunit.al
Note
Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
Tip
Not accurate? Reply with /not-accurate (optional: add a short explanation). Your feedback improves future responses.
The requested change has been implemented in microsoft/BCApps#10901, and the corresponding Azure Boards work item 648505 is resolved as fixed. Closing this issue as completed.
Activity
github-actions commentedon Aug 21, 2026
Hi Tuan Nguyen (@tuan-nguyen-fenwick),
Thank you for your extensibility request. To help us process it efficiently, please update the issue to include the required information.
📚 Extensibility Guidelines
Missing Information:
Sales-Postextensibility surface, what was tried or reviewed, and why those options are insufficient for this scenario instead of introducing a newIsHandledevent.Please update the issue with the missing details. We'll automatically re-analyze once updated.
Note
Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
Tip
Not accurate? Reply with
/not-accurate(optional: add a short explanation). Your feedback improves future responses.tuan-nguyen-fenwick commentedon Aug 28, 2026
github-actions commentedon Aug 28, 2026
Hi Tuan Nguyen (@tuan-nguyen-fenwick),
Thank you for your extensibility request. To help us process it efficiently, please update the issue to include the required information.
📚 Extensibility Guidelines
Missing Information:
OnBeforeUpdateSalesOrderLinesFromCreditMemo(var SalesInvoiceLine; var SalesCrMemoLine; var IsHandled)in the Correct Posted Sales Invoice flow is insufficient for your return-order/prepayment scenario.UpdateSalesOrderLineIfExistis skipped, your custom logic will preserve the required downstream sales order line update/modify consistency for the open sales order.Please update the issue with the missing details. We'll automatically re-analyze once updated.
Note
Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
Tip
Not accurate? Reply with
/not-accurate(optional: add a short explanation). Your feedback improves future responses.tuan-nguyen-fenwick commentedon Sep 1, 2026
OnBeforeUpdateSalesOrderLinesFromCreditMemo(var SalesInvoiceLine; var SalesCrMemoLine; var IsHandled)is in an internal function that could be called else where within the base application. More specifically, it doesn't know the context that it's called from a return order posting. And therefore, we want an event within the Sales-Post codeunit itself to handle during posting of return orders with prepayments.github-actions commentedon Sep 1, 2026
✅ Analysis complete - ready for further processing
Implementation:
Add a new
OnBeforeUpdateSalesOrderLineIfExist(DocumentNo: Code[20]; var IsHandled: Boolean)integration event at the start ofUpdateSalesOrderLineIfExistin codeunit 80Sales-Postso extensions can skip the standard sales order line update logic.Location in
UpdateSalesOrderLineIfExistprocedure:Event Publisher (add at the end of the codeunit with other events):
File:
SalesPost.Codeunit.alNote
Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
Tip
Not accurate? Reply with
/not-accurate(optional: add a short explanation). Your feedback improves future responses.JesperSchulz commentedon Sep 3, 2026
The requested change has been implemented in microsoft/BCApps#10901, and the corresponding Azure Boards work item 648505 is resolved as fixed. Closing this issue as completed.
[29.x] Backporting extensibility requests - batch 1751 (#11338)