To skip testfield(Quantity) in Service Line - Field "Line Discount Amount"
Hi
we need to Handle Quantity in service line Line Discount Amount OnValidate trigger, for that we need as below Event,

Thanks! Regards Srinivas
Please always put the full detailed signature of the requested events and the parameters passed in the call. You help us implementing the requests faster when your request contains AL code copied from VSCode instead of screenshots.
Here you can find the parameters
OnValidate Trigger:
**field(103; "Line Amount"; Decimal) { AutoFormatExpression = "Currency Code"; AutoFormatType = 1; CaptionClass = GetCaptionClass(FieldNo("Line Amount")); Caption = 'Line Amount';
trigger OnValidate()
var
ServAmountsMgt: Codeunit "Serv-Amounts Mgt.";
LineDiscountAmountExpected: Decimal;
Handle: Boolean;
begin
TestField(Type);
OnBeforeQuantityTestfield(Rec, xRec, Handle);
if not Handle then
TestField(Quantity);
TestField("Unit Price");
Currency.Initialize("Currency Code");
"Line Amount" := Round("Line Amount", Currency."Amount Rounding Precision");
LineDiscountAmountExpected := Round(CalcChargeableQty * "Unit Price", Currency."Amount Rounding Precision") - "Line Amount";
if ServAmountsMgt.AmountsDifferByMoreThanRoundingPrecision(LineDiscountAmountExpected, "Line Discount Amount", Currency."Amount Rounding Precision") then
Validate("Line Discount Amount", LineDiscountAmountExpected);
GetServHeader();
if ServHeader."Tax Area Code" = '' then
UpdateVATAmounts;
end;
}**
IntegrationEvent:
[IntegrationEvent(false, false)] local procedure OnBeforeQuantityTestfield(var ServiceLine: Record "Service Line"; var xServiceLine: Record "Service Line";Handled: Boolean) begin end;
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.
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.