CRM 2015 – {Javascript Code Example #2} – Save a form asynchronously with call back func




If for any reason you need to have a call back function in CRM after saving a form asynchronously it is possible to do with this line below:

Xrm.Page.data.refresh(save).then(successCallback, errorCallback); 

More detail please see next table:

Name Type Required Description

save

Boolean

No

true if the data should be saved after it is refreshed, otherwise false .

successCallback

Function

No

A function to call when the operation succeeds.

errorCallback

Function

No

A function to call when the operation fails.

An object with the following properties will be passed:

  1. errorCode : Number . The error code.

  1. message : String . A localized error message.

Src:

https://msdn.microsoft.com/en-us/library/dn481607.aspx

#CodeExamples #Javascript

0 views0 comments

Recent Posts

See All