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

Ribbon Workbench- Button on Homepage Grid doesn't fire javascript

(0) ShareShare
ReportReport
Posted on by 115

Hello guys,

I have problem with Ribbon Workbench. I want to add button on homepage grid and add JavaScript on it.

I've added a test JS and added button in solution. I can see button but it doesn't work.

4188.ribbon.PNG

When I go to developer tools I can't see JS which means that button is not connected with JS.

Can you help me to set up button in Ribbon Workbench for button to work? Do I need to add Display or Enable rule maybe? I don't know what to do because I use RW for buttons on form and it works properly.

Btw JS code is proper and simple just to test.

This is how I set button.

6254.rw.PNG

Any feedback would be grateful

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    Can you please provide screenshot of command.

  • Suggested answer
    Priyesh Profile Picture
    7,396 User Group Leader on at

    Hi,

    It might be that the JS file is not added to the Form Properties itself. You'll need to add it here.

    Please check if it is here - 

    formProperties.png

  • Suggested answer
    Sreevalli Profile Picture
    3,256 on at

    Hi,

    you must specify your library and function under command actions. If your facing issue after adding then share the function snip along with command details

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hello Ivan,

    Simple step you need to check , mentioned here in below screen shot , make sure you published from ribbon workbench and do  Publish All customization once.

    2019_2D00_01_2D00_18_5F00_20_2D00_40_2D00_23_5F00_ribbon2.png

    2019_2D00_01_2D00_18_5F00_20_2D00_40_2D00_23_5F00_ribbon2.png

    Hope this helps.

    -

  • Ivan Burda Profile Picture
    115 on at

    Guys, thank you all for your responses.

    As I said, I’ve done this so many times, and I've been adding buttons on Ribbon Workbench, but on regular Form. I know how to do that, add command, and javascript etc.

    Now is the first time that I’m adding button on Homepage form, actually on list of records, and now is the first time that I’m facing a problem.

    I’ve checked again, and everything is there. You can check on these screenshots.

    I think that something else is problem but I don’t know is there any difference when you addbutton on regular form and on homepage form?

    rw-command.PNG

    rw-command.PNG

    Thank you all

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    There should be nothing special. My recommendation - add debugger; at the start of your function to see if it's get triggered or not.

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    I think you are doing similar mentioned below article , please have a look ,may be you are missing something  -

    ribbonworkbench.uservoice.com/.../129783-pass-the-currently-selected-grid-row-s-to-a-custo

  • Ivan Burda Profile Picture
    115 on at

    I've checked debugger using F12 and i can't see any javascript. On  record form i can see Custom JavaScript library but when i go to list of records i cant see any custom js

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    For ribbon other approach is used if I'm not mistaken. That code is added on the fly and not through script reference tag so you will not see exact reference of your JS webresource.

    Again - use debugger directive in your code - www.w3schools.com/.../jsref_debugger.asp

  • ScottDurow Profile Picture
    21 on at

    Andrew is on the money - you won’t see the web resources loaded in F12 because of the dynamic script loading. The script will not even load until the command is called for the first time. It could be that your script is loaded but has a syntax or runtime exception. if you add a debugger statement you’ll see the F12 debugger step into it if it’s loaded.

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans