I want to stop a customer from registering two times with same email address. I do not know how I can check the client's email address from the eCommerce registration page.
For example, when a client enters an email in the eCommerce registration page, check if the email was previously registered in the website or not.
If yes, don't let the customer register it again and show a message to the client.
Code that check the email address:
function clientValidateField(type, name, linenum){
var filter = new nlobjSearchFilter('email', null, 'is', givenEmail);
var result = nlapiSearchRecord('customer', null, filter, null);
return (results == null);
}
But I can't call it from client side.