Saturday, 22 December 2018

To prevent default save of form in Dynamics crm using javascript

To stop the save event in Javascript all you need is this
event.returnValue = false;
Tanguy the CRM tool guy (and CRM MVP) put something very interesting in the comments but I thought I would promote it to this very small blog post
The new method in CRM 2011 is the following one:
Xrm.Page.context.getEventArgs().preventDefault();
preventDefault : Cancels the save operation, but all remaining handlers for the event will still be executed.

No comments:

Post a Comment

Updating Records Without Triggering Plugins – Bypassing Plugin Execution in Dynamics 365 / Dataverse using C#

  Recently, we had to write a small utility—a console application—that would go and update a bunch of existing records in our Dynamics 365 e...