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?
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.
Seems like you have to do few extra trick.
Ref: https://ribbonworkbench.uservoice.com/knowledgebase/articles/489288-show-or-hide-the-add-new-button-on-form-sub-grid