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 :
Microsoft Dynamics CRM (Archived)
Suggested Answer

Button not working on homegrid command Bar MS CRM 2016 online

(0) ShareShare
ReportReport
Posted on by 1,372 Super User 2026 Season 1

Hi Guys,

I am trying to disable a button on the basis of roles , for which i have written a JS to identify roles . I have added command on HomeGrid button and mention Enable rule but JS is not detecting/working for my grid button.

Any Suggestion?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Bas van de Sande Profile Picture
    4,383 on at

    Hi Manoj,

    the problem can be caused by multiple issues, e.g.:

    1. script not attached in a proper way to the enable rule

    2. bug in script

    What you can do is alter the script, and insert as first statement "debugger;"  

    save and publish the modification

    from there on, open the developer tools in your browser (F12 in IE/Edge)

    refresh the page.

    The script should break on the debugger statement, allowing you to step through your code and place additional breakpoints inside in order to verify the script.

    once done, you should remove the debugger statement from your script

    for more information: www.w3schools.com/.../jsref_debugger.asp

    Good luck

    Bas

  • Suggested answer
    Community Member Profile Picture
    on at

    Please verify if you have added the Command to Button. Also verify if your javascript library name and function name are correct in javascript rule.

    Please verify that javascript has no errors. Put the script on the form first and check if it's working.

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 Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans