Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to call Javascript

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

3730.ribbon.png 

Hi,

I am new on CRM and add button "Contact" at ribbon,i add javascript in web resources.

I add simple javascript function:

function Hello() {   alert(“This is custom button”); }

After that I call this function from Ribbon Workbench and i publish the solution.

After that return to my Account form and i click on "Contact Button" its not working.

How do i call java script function. Anybody tell me.!

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to call Javascript

    Hi,

    did you follow the tutorial? ribbonworkbench.uservoice.com/.../71374-1-getting-started-with-the-ribbon-workbench

    As Andrew wrote, you probly forgot to add the action of the button

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: How to call Javascript

    Hello,

    Doublecheck that you performed all the steps mentioned here - exptechsolutions.blogspot.com/.../know-how-add-ribbon-button-using-ribbon.html

    Don't forget to assign command to button (this is my usual mistake when I add buttons and button does nothing when I click it).

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to call Javascript

    Hi,

    I create a "Command" on ribbon workbench then i add javascript "function Hello() {   alert(“This is custom button”); }"

    And this command is called in my ribbon workbench.

  • Clem Profile Picture
    Clem 2,541 on at
    RE: How to call Javascript

    Hi,

    Can you explain how you configured the command action on the ribbon button ?

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans