Hello,
I have written the code for creating the new user but after FINDLAST cursor is not going inside.
If i split the code then it is running working fine.
Please suggest me that where I am going wrong.
//START-002
lrecWebUser.RESET;
lrecWebUser.SETCURRENTKEY("E-Mail Address");
//lrecWebUser.SETRANGE("Customer No.",pCustomerNo);
lrecWebUser.SETRANGE("E-Mail Address",pEmail);
IF lrecWebUser.FINDFIRST THEN BEGIN
blnExistingEmail:=TRUE;
ERROR(Text50000, lrecWebUser."Customer No.", lrecWebUser.Username);
END ELSE
BEGIN
lrecWebUser.SETCURRENTKEY(Username);
//MESSAGE('hi');
//lrecWebUser.SETRANGE("Customer No.",pCustomerNo);
IF lrecWebUser.FINDLAST THEN
BEGIN
blnExistingEmail:=FALSE;
lrecWebUser.Username:=INCSTR(lrecWebUser.Username);
MESSAGE('%1',lrecWebUser.Username);
lrecWebUser."First Name":='Aditi';
//ImportWebUserAdmin.IMPORT;
//funImportWebUserAdmin('VM0T000001');
lrecWebUser.INSERT(TRUE);
MESSAGE('hi');
END //ELSE
//blnCorrectEmail:=FALSE;
END;
//STOP-002
*This post is locked for comments