XMLport contains SalutationCode, FirstName, MiddleName, Surname, Address, City, MobilePhoneNo, Email, SalesPersonCode from table Contacts
I try to check if record already exists in database, like this:
OnPostXMLport()
MESSAGE (‘Contact(s) importations successful’);
Contact - Import: : OnAfterInitRecord()
Contact.INIT;
Contact.VALIDATE(Name);
ERROR(‘Record already exist’);
Contact - Import: :OnBeforeInsertRecord()
employerrec .RESET;
IF employerrec .GET(Contact.“Company No.”)= FALSE
THEN ERROR (‘Invalid Employer code for ’ + Contact.Surname +’ ’ + Contact.“First Name” +’ '+ Contact.“Middle Name” );
Contact.“Company Name”:=employerrec.“Company Name PenCom”;
It keep saying “Record already exists” when I import new entries. Thanks