Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Button not working on homegrid command Bar MS CRM 2016 online

Posted on by 140

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

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Button not working on homegrid command Bar MS CRM 2016 online

    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.

  • Suggested answer
    Bas van de Sande Profile Picture
    Bas van de Sande 4,383 on at
    RE: Button not working on homegrid command Bar MS CRM 2016 online

    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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans