i have created a table in which data get inserted when the user insert a value in decimal field,
For one document it is inserting the data but for second document it is showing error,
My code,
IF “Freight Amount” <> 0 THEN BEGIN
RecFrtLog.RESET;
RecFrtLog.INIT;
RecFrtLog.“Serial No”:=RecFrtLog.“Serial No”+1;
RecFrtLog.“Document No.”:=“No.”;
RecFrtLog.“Port of Discharge”:=“Port of Discharge”;
RecFrtLog.“Freight Amount”:=“Freight Amount”;
RecFrtLog.“User ID”:=USERID;
RecFrtLog.“Date and Time”:=CURRENTDATETIME;
RecFrtLog.INSERT;
END;
i have written this code in On Insert of sales header.