ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] Table 5902 "Service Line" - OnBeforeLineDiscountAmount
Hi, would it be possible to get an event OnBeforeLineDiscountAmount Table 5902 "Service Line", like this :
field(28; "Line Discount Amount"; Decimal)
{
AutoFormatExpression = "Currency Code";
AutoFormatType = 1;
Caption = 'Line Discount Amount';
trigger OnValidate()
begin
TestStatusOpen;
GetServHeader;
TestField(Quantity);
if "Line Discount Amount" <> xRec."Line Discount Amount" then begin
OnBeforeLineDiscountAmount(Rec, Currency);
UpdateLineDiscPct;
end;
"Inv. Discount Amount" := 0;
"Inv. Disc. Amount to Invoice" := 0;
Validate("Line Discount %");
end;
}
[IntegrationEvent(false, false)]
local procedure OnBeforeLineDiscountAmount(var Rec: Record "Service Line"; var Currency: record 4)
begin
end;
Thanks!
There is already a OnBeforeUpdateLineDiscPct in UpdateLineDiscPct procedure which is called only from here and has the params you are requesting. You should use that 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.