Search code examples
dynamics-crmdynamics-crm-onlinedynamics-365dynamics-crm-365crm-ribbon-workbench

How to Asynchronously Show a Create New Button On a CRM Sub Grid?


I need to hide the "Add New" button on a sub grid until certain criteria are met. Calling Xrm.Page.ui.refreshRibbon will trigger my JS function defined in my Enable Rule, but I can't get the + button to show up.

Is this unsupported, or is there some methodology to get this to work?


Solution

  • Arun Vinoth did find a great article to describe the issue, but actually I've found that just calling refresh on the grid itself was all that was actually required.

    It's important to note, that this does not re-run the enable rules, just shows the button if the state has changed.