Michael Philip's Blog

Writing about MS Tech with strong focus on Azure & CRM

Cancel Save Operation Using Java Script In Microsoft Dynamics CRM 2011

3 Comments

Problem: Suppose you want to check for same values entered by the user on the “on save” event and at certain conditions you want to cancel the save operation.

Solution:  Put the following code inside the “on save” event handler .

code:
Xrm.Page.context.getEventArgs().preventDefault();

Advertisements

3 thoughts on “Cancel Save Operation Using Java Script In Microsoft Dynamics CRM 2011

  1. Thanks, it was helpful 🙂

  2. It doesn’t work….!!….getEventArgs() is not function function of Xrm.Page.context.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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