ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event request] PAG 475 OnBeforeOnAfterGetRecord

Open aobsgit opened this issue 6 years ago • 1 comments

For Slovenian localization we have our own VAT statement report, including the CalcLineTotal function which we would like to call instead of current one from Report 12. Our suggestion:

  • add a function CalcColumnValue which calculates the ColumnValue variable

  • on begining of the function set an event publisher with var parameter IsHandled

    trigger OnAfterGetRecord() begin CalcColumnValue(Rec, ColumnValue, 0); if "Print with" = "Print with"::"Opposite Sign" then ColumnValue := -ColumnValue; end;

    procedure CalcColumnValue(Rec: Record "VAT Statement Line"; var TotalAmount: Decimal; Level: Integer) var IsHandled: Boolean; begin OnBeforeCalcColumnValue(Rec, ColumnValue, 0, IsHandled); if IsHandled then exit; VATStatement.CalcLineTotal(Rec, ColumnValue, 0); end;

    [IntegrationEvent(true, false)] local procedure OnBeforeCalcColumnValue(VATStatementLine: Record "VAT Statement Line"; var TotalAmount: Decimal; Level: Integer; var IsHandled: Boolean) begin end;

aobsgit avatar Feb 28 '20 11:02 aobsgit

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. We will update this issue with information about availability.

bc-ghost avatar Mar 18 '20 06:03 bc-ghost