Skip to main content
Microsoft Dynamics CRM forum
Answered

Hiding a Custom Button

editSubscribe (0) ShareShare
ReportReport
Posted on by 15
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!
 
Categories:
Attachments
  • Verified answer
    Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    Hiding a Custom Button
    Hi,
    Please refer to the following thread with same needs:
    --Two web resource, one is used to rule in ribbon workbench, and another is used to tan change event.

    I hope you can mark my answer verified if it answer your question! If you have any questions, please feel free to contact me.
    Regards,
    Leah
     

Helpful resources

Quick Links

New Blog Features Released!

Check out the new community blog features for viewers and authors…

Demystifying Copilot with Sundar Raghavan

Sundar explains how Copilot for Service is meant to function separately...

Business Process Guidance Badges and New…

The Microsoft Success by Design is the framework for implementing Dynamics 365…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,277 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,989 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans