Hi,
I am getting below error when use getEventArgs().preventDefault(); for cancel save command. Please find my script and screen-shots for more reference. Kindly help to find the solution. It display the alert message then give below error and save the record.
This is CRM 2011 rollup 18 version. I am fixing all java scripts issue before upgrading to CRM 2013.
Will the getEventArgs().preventDefault(); command work on CRM 2011 rollup 18 version. Please verify.
Script on save
function Form_onsave(executionObj)
{
if(buXml == 'n')
{
alert("Please enter contact of IT, Purchase,Finance/Management on this account before entering opportunity");
executionObj.getEventArgs().preventDefault();
}
}
Error
Save handler setup