ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Codeunit 401 "Sales Header Apply"

Open bogdangarkusha opened this issue 4 years ago • 1 comments

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.

bogdangarkusha avatar Jun 02 '22 14:06 bogdangarkusha

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.

JesperSchulz avatar Jun 06 '22 15:06 JesperSchulz