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 :
Customer experience | Sales, Customer Insights,...
Answered

I have added a button in xrmtoolbox and how can i load JS into its library ?

(2) ShareShare
ReportReport
Posted on by 16
Please help here. I want to add one JS or webresource to this command. I am pretty new to dynamics and XRM tool box. It would be great if someone share step by step approach.
 
Please help -- @a33ik , @Guido Preite , @XM-22040801-0
 
I have the same question (0)
  • Verified answer
    Anne Pessoa Profile Picture
    14 on at
    Hi there,
     
    You are using the RibbonWorkBench within the XrmToolBox, there are some good tutorials online with step by step on how to add buttons using the RibbonWorkBench , like :https://community.dynamics.com/blogs/post/?postid=3957f38b-89a5-41ec-b0bf-0d4e5df3f48f and https://kaskelasolutions.com/2016/08/08/customizing-the-microsoft-crm-ribbon-ribbon-workbench-solution/
     
    But basically you need to create a JS webresource and add your function there, once that's done you can then search for the WebResource name in the library box and then add your function name there.
     
    Hope this helps,
    Anne Pessoa.
  • Verified answer
    Holly Huffman Profile Picture
    6,530 Super User 2025 Season 2 on at
    Good morning, afternoon, or evening depending on your location!
     
    To load JavaScript (JS) or a web resource into a button command in XrmToolBox, here’s a step-by-step approach:
    1. Create the Web Resource:
      • In Dynamics 365, navigate to Settings > Customizations > Customize the System.
      • Under Components, select Web Resources and create a new JavaScript (JS) web resource.
      • Add your JavaScript code to the web resource and save it.
    2. Publish the Web Resource:
      • Once created, publish the web resource to make it available for use.
    3. Open XrmToolBox:
      • Launch XrmToolBox and connect to your Dynamics 365 environment.
    4. Use the Command Button Plugin:
      • If you’re using a plugin like Ribbon Workbench, load the solution where you want to add the button.
    5. Add the Button:
      • In the Ribbon Workbench, add a new button to the desired entity or form.
    6. Link the Web Resource:
      • In the button properties, specify the JavaScript function you want to call.
      • Reference the web resource by its name and include the function name in the command definition.
    7. Publish the Changes:
      • Save and publish the changes in Ribbon Workbench.
    8. Test the Button:
      • Navigate to the entity or form where the button was added and test its functionality.
     
    Hope this helps some!
  • BM-21041728-0 Profile Picture
    16 on at
    @Holly Huffman and @Anne Pessoa Thanks for the response. This helps !!
     
    Now, i am planning to promote code to next environment. I am using TFS for code repository and promotion.
     
    Can you help woht steps to promote in TFS ?

    In TFS, I Placed JS under "Case" entity in SourceCode and updated the details of the same in XML. But i cannot see this JS only in the next environment.
     
     

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 83 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans