Closed andresteunenberg1964 closed 1 month ago
✅ Successfully linked to Azure Boards work item(s):
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 22697.
Describe the request
Could you add the global variable SalesOrderHeader as a var parameter to the existing event OnBeforeCreateSalesHeader because we want to customize the filling of the global record variable SalesOrderHeader. On a side not: if in the current situation IsHandled would be set to True, the record variable SalesOrderHeader would not be assigned, which seems like a bug if this is not possible as in the subsequent code this global variable is used to created new Sales Order Lines.
Original Event: [IntegrationEvent(false, false)] local procedure OnBeforeCreateSalesHeader(var SalesHeader: Record "Sales Header"; PrepmtPercent: Decimal; var CreditLimitExceeded: Boolean; var IsHandled: Boolean) begin end;
Modified Event as replacement: [IntegrationEvent(false, false)] local procedure OnBeforeCreateSalesHeader(var SalesHeader: Record "Sales Header"; PrepmtPercent: Decimal; var CreditLimitExceeded: Boolean; var IsHandled: Boolean; var SalesOrderHeader: Record "Sales Header") begin end;
Additional context
For a customer with more than 1 blanket contract we want to have the possibility to create a Sales Order which consists of lines from different Blanket Orders (from the same customer). In that case the Sales Order Header must be created only once. Internal work item: AB#543331