The Xrm.Page.data.refresh method
Views (18325)
CRM 2013 introduced new client APIs, one is the Xrm.Page.data.refresh method.
The MSDN definition is:
Asynchronously refreshes and optionally saves all the data of the form without reloading the page.
The obvious reason is that we want the actual data displayed on the form, the inner reason is due to the Dynamics CRM platform, a record can be updated in several ways including workflows or plugins operating server-side.
Most of the server-side events don't refresh the UI, but with the Xrm.Page.data.refresh method we can manually force the page to display the current values.
If we want a simple refresh we can just write:
The MSDN definition is:
Asynchronously refreshes and optionally saves all the data of the form without reloading the page.
Why we leverage on this method?
Xrm.Page.data.refresh(save).then(successCallback, errorCallback);
The obvious reason is that we want the actual data displayed on the form, the inner reason is due to the Dynamics CRM platform, a record can be updated in several ways including workflows or plugins operating server-side.
Most of the server-side events don't refresh the UI, but with the Xrm.Page.data.refresh method we can manually force the page to display the current values.
If we want a simple refresh we can just write:
A small advice will appear during the operation
Xrm.Page.data.refresh(false);
This was originally posted here.

Like
Report
*This post is locked for comments