Hello,
I have two new fields in Sales Header: Final Total Amount and Prepayment Amount, and an originally existing field: Prepayment %.
If I change the value of Prepayment Amount I would like Prepayment % to be changed automatically and vice versa.
I wrote this code to OnValidate() triggers of Final Total Amount and Prepayment Amount, and it works perfectly.
VALIDATE (“Prepayment %”, (“Prepayment Amount”/“Final Total Amount”)*100);
I tried this code to OnValidate() triggers of Final Total Amount and Prepayment %, but it is not working.
VALIDATE („Prepayment Amount”, „Final Total Amount”*(„Prepayment %”/100));
In OnValidate() trigger of Prepayment % there is already this code:
UpdatePrepmtType;
UpdateSalesLines(FIELDCAPTION(“Prepayment %”),CurrFieldNo <> 0);
If I write my code before these lines, I get the error message:
There is insufficient memory to execute this function. This can be caused by recursive function call.
If I write my code after these lines, I get a message box about refreshing the lines with no end, one after the other.
Where should I put this code and what should I alter?
Thanks a lot, Frida