[Event Request] Codeunit 401 "Sales Header Apply"
I would like to ask you to create an Integration event in codeunit 401 "Sales Header Apply", in trigger "OnRun".
trigger OnRun() begin SalesHeader.Copy(Rec); with SalesHeader do begin BilToCustNo := "Bill-to Customer No."; CustLedgEntry.SetCurrentKey("Customer No.", Open); // >>> OnRunOnBeforeFilterCustLedgEntry(CustLedgEntry, SalesHeader); // <<< CustLedgEntry.SetRange("Customer No.", BilToCustNo); CustLedgEntry.SetRange(Open, true); OnRunOnAfterFilterCustLedgEntry(CustLedgEntry); if "Applies-to ID" = '' then(CustLedgEntry, Rec); ... end;
Event signature: [IntegrationEvent(false, false)] local procedure OnRunOnBeforeFilterCustLedgEntry(var CustLedgerEntry: Record "Cust. Ledger Entry"; SalesHeader: Record "Sales Header") begin end;
In our extension, we need it because we would like to filter Customer Ledger Entry on extra data from a Sales Header.
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: 41782.