Hello, I created a custom button on RibbonWorkbench in my D365 online environment. Is there a way for me to hide the button when I am on a certain tab?
For example I want to hide my button /Next/ when I come to the Summary tab.
I tried adding this script to the Summary tab /On Tab State Change/
function hideCustomButton() {
var button = Xrm.Page.getControl(/ButtonName/);
if (button) {
button.setVisible(false);
}
}
This did not work, I am not sure what the actual name of the button would be. On Ribbonwork Bench I see Id and Command available.
Thanks for any help!