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

Announcements

News and Announcements icon
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
    140 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

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

#1
KristineRisberg Profile Picture

KristineRisberg 37

#2
11manish Profile Picture

11manish 35

#3
Manoj - ManoVerse Profile Picture

Manoj - ManoVerse 21 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans