Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

My ribbon work bench button is not working

Posted on by 12,070 Super User 2024 Season 1

Hi all,

I add a button on opportunity form using these properties of ribbon work bench

3005.Enable-rule.png

my js is shown below

function test()
{
debugger;
var width = 650 ; var height = 500;
var posLeft = (( screen.width - width ) / 2 ) ;
var posTop = (( screen.height - height ) / 2) ;
url = "win-us94vrpdbek/.../aw_PaymentMethodWhenOpportunityCloseAsWon"

window.open(url,'name', 'status=no, width=' + width + ',height=' + height +',top=' + posTop + ',left=' +
posLeft +',scrollbars=no,toolbars=no,menubar=no,location=no, align=center');
}

It do nothing when I clicked to the button. Please suggest me where I wrong.

Thank you

*This post is locked for comments

  • Suggested answer
    Alagunellaikumar Profile Picture
    Alagunellaikumar 6,210 on at
    RE: My ribbon work bench button is not working

    In the button properties, Did you select corresponding command in the command properties?

  • ScottDurow Profile Picture
    ScottDurow 50,177 on at
    RE: My ribbon work bench button is not working

    Hi - could you post your ribbon xml from the xml tab in the ribbon workbench please? The most common mistake is not setting the command on the button.

    Thanks

  • Suggested answer
    razdynamics Profile Picture
    razdynamics 17,304 User Group Leader on at
    RE: My ribbon work bench button is not working

    Hi Abdul Can you please confirm the following;

    You need to call the JavaScript function,  create the JavaScript Function Action for that command. Click on Actions lookup and click on Add button. Select JavaScript Function Action. Your function name should be test without parentheses ().

    You need to associate command to button.

    Add some alerts that will make sure that button is calling your function. declare url variable.

    Are you able to access URL that you trying to open from browser?

    Best Wishes, Raz

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans