Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

getEventArgs().preventDefault(); is not working

$
0
0

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



Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>