ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] codeunit 170 "Standard Codes Mgt." - multiple publishers
Hello, would it be possible to add OnCheckCreateSalesRecurringLinesBeforeApply, OnGetSalesRecurringLinesBeforeApply event to codeunit 170 "Standard Codes Mgt.", like this:
procedure CheckCreateSalesRecurringLines(SalesHeader: Record "Sales Header")
...
IF (StandardCustomerSalesCode.Count = 1) AND
StandardCustomerSalesCode.IsInsertRecurringLinesOnDocumentAutomatic(SalesHeader)
then begin
IsHandled := false;
> OnCheckCreateSalesRecurringLinesBeforeApply(SalesHeader, StandardCustomerSalesCode, IsHandled); //New Event
if not IsHandled then
StandardCustomerSalesCode.ApplyStdCodesToSalesLines(SalesHeader, StandardCustomerSalesCode, 0D, 0D);
end else
ShowGetSalesRecurringLinesNotification(SalesHeader);
procedure GetSalesRecurringLines(SalesHeader: Record "Sales Header")
...
if (StandardCustomerSalesCode.Count = 1) and
StandardCustomerSalesCode.IsInsertRecurringLinesOnDocumentAutomatic(SalesHeader)
then begin
IsHandled := false;
> OnGetSalesRecurringLinesBeforeApply(SalesHeader, StandardCustomerSalesCode, IsHandled); //New Event
if not IsHandled then
StandardCustomerSalesCode.ApplyStdCodesToSalesLines(SalesHeader, StandardCustomerSalesCode, 0D, 0D);
end else
StandardCustomerSalesCode.InsertSalesLines(SalesHeader);
local procedure OnCheckCreateSalesRecurringLinesBeforeApply(SalesHeader: Record "Sales Header"; StandardCustomerSalesCode: Record "Standard Customer Sales Code"; var IsHandled: Boolean)
local procedure OnGetSalesRecurringLinesBeforeApply(SalesHeader: Record "Sales Header"; StandardCustomerSalesCode: Record "Standard Customer Sales Code"; var IsHandled: Boolean)
This will be OnBeforeApplyStdCodesToSalesLinesProcedure in ApplyStdCodesToSalesLines
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.