Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Sales forum / Ribbon Workbench butto...
Sales forum
Answered

Ribbon Workbench button not reading one of my webresource Javascript functions

Posted on by

Hi,

I made a custom new ribbon workbench button and linked it to my webresource, and within this webresource there are many JS functions.

The strange problem I am facing now is that there is one JS function that does not seem to work while all others in the same file do.

The one that is not working is something very simple (I literally just changed it to a one liner console.log() statement to test it).

To explain with an example:

For example, let's say my webresource has 3 functions, functionA, functionB, and functionC (all inside the same webresource file, literally right next to each other)

In my ribbon workbench, if I map the custom JS action to functionA, it works fine, and if I map it to functionB, nothing happens at all when I click the button, and if I map it to functionC, it works fine.

In this example, functionB is just a simple console.log statement, and copying that function into functionA or functionC would both work correctly. And it's ONLY functionB that doesn't seem to respond at all.

Please advise.

Categories:
  • JYSSB7 Profile Picture
    JYSSB7 on at
    RE: Ribbon Workbench button not reading one of my webresource Javascript functions

    Renaming the function worked.

  • Verified answer
    Pradeep Rai Profile Picture
    Pradeep Rai 5,490 Super User 2024 Season 2 on at
    RE: Ribbon Workbench button not reading one of my webresource Javascript functions

    Can you please share code snap and ribbon snap for function B?

    Also, please try by renaming the function and check syntax issue like curly braces closing

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,252 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,089 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans