B: formContext.ui.refreshRibbon(refreshAll); Causes the ribbon to re-evaluate data that controls what is displayed in it. Indicates whether all the ribbon command bars on the current page are refreshed. If you specify false, only the page-level ribbon command bar is refreshed. If you do not specify this parameter, by default false is passed. Remarks: This function is typicaly used when a ribbon (RibbonDiffXml) depends on a value in the form. After your code changes a value that is used by a rule, use this method to force the ribbon to re-evaluate the data in the form so that the rule can be applied. D: If role is there - just refresh the ribbon to see the button if (isButtonEnabled) { formContext.ui.refreshRibbon(); } }, Reference: https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/formcontext-ui/refreshribbon https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/302049/show-hide-button-bases-on-different-criteria/871674