I put the following script in the OnSave event of the contact form...
if (crmForm.all.telephone1.DataValue == null &&
crmForm.all.telephone3.DataValue == null &&
crmForm.all.emailaddress1.DataValue == null)
{
// inform user that something is required
alert("Please provide a phone number or email address.");
// give focus to the first control
crmForm.all.telephone1.SetFocus();
// Cancel the save
event.returnvalue = false;
}
When I start a new contact and click save without one of the three
fields referenced, it gives the alert window but then saves and exits
anyway. What am I doing wrong?
Thank for any help
Greg