Preventing/Cancelling CRM Form onSave event

Preventing/Cancelling CRM Form onSave event

write the below code end of the result.

event.returnValue = false;

return false;

or this may help you the same

In the ValidateData method make sure you have a parameter defined to receive the Execution Object.

function ValidateData(ExecutionObj){
//Place all your data validation here
//In case data is not valid call the below method
// The getEventArgs() method returns an object with methods to manage the Save event.
// The preventDefault() method cancels the save operation




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s