Pages

Tuesday 2 July 2013

CRM 2011: JavaScript to refresh CRM form ribbon & form controls using Xrm.Page Object Model

JavaScript to refresh CRM form ribbon & form controls using Xrm.Page Object Model

Xrm.Page Object Model should be used to refresh ribbon and controls on the CRM form.

Refresh Ribbon

refreshRibbon() method should be used to refresh form ribbon. Normally this code snippet is used to refresh(re-evaluate) ribbon to enable/disable or show/hide ribbon components when the data is changed on the form.
Xrm.Page.ui.refreshRibbon();

Refresh SubGrid


Following code snippet can be used to refresh data in the SubGrid.

Xrm.Page.getControl("accountcontactsgrid").refresh();

No comments:

Post a Comment