The MSDN definition is:
Asynchronously refreshes and optionally saves all the data of the form without reloading the page.
Xrm.Page.data.refresh(save).then(successCallback, errorCallback);Why we leverage on this method?
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:
Xrm.Page.data.refresh(false);A small advice will appear during the operation
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7tbg2arPsrL6N1U1vucDPrg8N7rRtspag1SjoFvCuxoFRfConcx1np3A_kGd2F_U2anSORUyojApOURSKmliOFmhnpPWGyCPTqX46PlcYuQnbwaGruiEK5AT_zAypRhzOJ5tmZMn3as4/s1600/processing.png)
0 comments:
Post a Comment