On the OnClosePage of the customer card I have code which should check a table to see if the Customer No. Exists and if not create a record in the table with the details below.
However It doesn't appear to work, how can I amend the code?
RESET;
IF Rec.FINDSET THEN BEGIN
recmanufacturer2.RESET;
recmanufacturer2.SETRANGE(Code, "No.");
IF NOT recmanufacturer2.FINDFIRST THEN BEGIN
recmanufacturer2.Code := Rec."No.";
recmanufacturer2.Name := Rec.Name;
recmanufacturer2.INSERT;
END;
END;
Thanks!
*This post is locked for comments