Blog Site


Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. You don't have Add and Customize Pages permissions required to perform this action. Correlation ID: bba7429e-60c7-f008-e1ec-dc5de4c6806f.
Dec 01
How to refresh the ribbon of the Homepage Grid in CRM 2011

As we know in an Entity Form of CRM 2011, if we want to refresh the ribbon to reactivate the enable rules or the display rules for example, we call the method refreshRibbon() of the object Xrm.Page.ui. But what happen if we try this method in the ribbon of the Homepage Grid of an Entity? We'll find that the Xrm.Page.ui returns null and therefore won't have the method previous mentioned. Then, what we have to do to refresh the ribbon in the Homepage Grid for example when another button in the Ribbon needs to update the rules when it is clicked?

This method is not supported by Microsoft. Use it under your own risk.

Is very simple. The only thing we have to do is to call the click event of the refresh button of the entity grid in our function:

function RefreshHomeRibbon(){

      var refresh = document.getElementById("refreshButton"); // this will be the table container

      if(refresh != null) {

        refresh.children[0].children[0].children[0].children[0].onclick(); // call click event in the <a> tag

        //       <tbody>      <tr>         <td>        <a>    

        // Sometimes you need to call twice to take effect





The refresh object will return an html table. To access the click event you need to enter the <a> tag children and call it.

And finally call this function in yours (RibbonButtonClick here):

function RibbonButtonClick(){

     var a = b + c;



Enjoy it!


Xitij Thool

It worked well , thanks.
 on 2/5/2012 22:37


Thanks for the information, it works!!!
 on 12/5/2012 14:01
All Material in this Website is Property of Remoting Coders. ©2003-2017 Remoting Coders. All rights reserved.

John Doe

Chat with us

Jane Smith
12:23 PM

Hi, I wanted to make sure you got the latest product report. Did Roddy get it to you?

Remoting Coders is typing a message...
All of our staff members are not available at the moment, please try again later, or leave your questions here and we'll back to you shortly.