Hello Experts,
I am experiencing an issue where I have seemingly two identical fields and I am using the onvalidate trigger on the page to modify these fields (to recalculate the values). When I modify the subtotal Cost on my page and tab out the subtotal cost changes immediately.
field(50109; "Subtotal Cost Excl Tax"; Decimal)
{
FieldClass = FlowField;
CalcFormula = sum("Sales Line".SubtotalCostExclTaxLine where("Document No." = field("Document No.")));
}
field(50117; "Subtotal Line Amount"; Decimal)
{
FieldClass = FlowField;
CalcFormula = sum("Sales Line".LineAmount2 where("Document No." = field("Document No.")));
}
When I am modifying the Subtotal Line Amount the value does not change right away and only seems to change after I click around on the page, or enter another value into a different field. Is this a common issue? Is there something I am missing in the setup?
both of the triggers on page look like this
trigger OnValidate()
begin
Rec.Calcfields(Subtotal field here);
end;