ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] Table 11401 CBG Statement Line - OnBeforePmtTolCBGJnl
In the OnValidate-trigger for field "Amount", we need an event to be able to skip executing PaymentToleranceMgt.PmtTolCBGJnl, based upon a certain value in xRec, using the IsHandled-pattern.
field(20; Amount; Decimal)
{
Caption = 'Amount';
trigger OnValidate()
var
IsHandled: Boolean; // <<New local var>>
begin
UpdateLineBalance;
CalculateVAT;
// <<Start new code
IsHandled := false;
OnBeforePmtTolCBGJnl(Rec, xRec, IsHandled);
if IsHandled then
exit;
// >>End new code
if (Amount <> xRec.Amount) and (Amount <> 0) then
PaymentToleranceMgt.PmtTolCBGJnl(Rec);
end;
}
// <<Start new event
[IntegrationEvent(false, false)]
local procedure OnBeforePmtTolCBGJnl(var CBGStatementLine: Record "CBG Statement Line"; var xCBGStatementLine: Record "CBG Statement Line"; var IsHandled: Boolean);
begin
end;
// >>End new event
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: 44168.