Save event arguments (client-side reference)
Applies To: Microsoft Dynamics CRM 2013, Microsoft Dynamics CRM Online
In the save event you can use the execution context object getEventArgs method to retrieve an object that contains methods you can use to manage the save event.
- Returns a value indicating how the save event was initiated by the user.
- Returns a value indicating whether the save event has been canceled because the preventDefault method was used in this event hander or a previous event handler.
- Cancels the save operation, but all remaining handlers for the event will still be executed.
Returns a value indicating how the save event was initiated by the user.
- Return Value
The following table describes the supported values returned to detect different ways entity records may be saved by the user.
Entity Event Mode Value
Save and Close
Save and New
Save as Completed
User or Team owned entities
- This method is essential if you want to enable auto-save for most forms in an organization but disable it for specific forms. The following code registered for the onSave event with the execution context passed to it will prevent any saves that initiate from an auto-save but allow all others. With auto-save enabled, navigating away is equivalent to Save and Close. This code will prevent any saves that are initiated by the 30 second timer or when people navigate away from a form with unsaved data.
Microsoft Dynamics CRM 2013 and Microsoft Dynamics CRM Online
Send comments about this topic to Microsoft.
© 2014 Microsoft Corporation. All rights reserved.