web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Where/How to add JavaScript code in Ribbon Workbench?

(0) ShareShare
ReportReport
Posted on by 5

Hi,

We need to hide Activate/Deactivate button depending on the security role/team of the user.  Where/How in Ribbon workbench can I insert a code to that?

Thank you.

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Chesca,

    Please follow the steps:

    1. Create a web resource which type is Jscript(your code).

    2. Right click button and click customise button command:

    Snipaste_5F00_2022_2D00_01_2D00_31_5F00_08_2D00_58_2D00_36.png

    3. Add an Enable rule and add a custom rule step( Library is your web resource in step1. Function Name is the function name in your code):

    Snipaste_5F00_2022_2D00_01_2D00_31_5F00_09_2D00_00_2D00_35.png

    4. Add the Enable rule(Created in step3) to the command:

    Snipaste_5F00_2022_2D00_01_2D00_31_5F00_09_2D00_08_2D00_25.png

    5. Publish it.

    Reference:

    d365demystified.com/.../

  • Suggested answer
    Pawar Pravin  Profile Picture
    5,237 on at

    Please refer below url for reference:

    pravinpawarweb.wordpress.com/.../

  • Suggested answer
    Varsha deshpande Profile Picture
    135 on at

    Hi,

    Please create a web resource of type JavaScript and add an enable rule for hiding the button.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 57 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 34 Most Valuable Professional

#3
Scott Jackson UK Profile Picture

Scott Jackson UK 22

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans