Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Is there any supported way to pass dynamic value(label) of ribbon button as parameter to enable rule ?

Posted on by Microsoft Employee

Hi All,

Is there any supported way to pass dynamic value(label) of ribbon button as parameter to enable rule ?

As I have checked there is no crm parameter for retrieving button property.

Can anyone suggest supported way or unsupported way ?

If supported way, it will be better otherwise we have to manipulate the dom.

*This post is locked for comments

  • Verified answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Is there any supported way to pass dynamic value(label) of ribbon button as parameter to enable rule ?

    Hi Arun,

    I believe button name will not change anytime so you can use Custom Rule and pass your hard coded string  parameter over there .

    2018_2D00_12_2D00_13_5F00_12_2D00_58_2D00_24_5F00_enable-rule.png

    function GetButtonName(buttonname) {  
        if ((buttonname === 'ImportData') )
          // do something
    }


  • Suggested answer
    prasanth kancharla Profile Picture
    prasanth kancharla 335 on at
    RE: Is there any supported way to pass dynamic value(label) of ribbon button as parameter to enable rule ?

    For your requirement you can create a enable rule which satisfy for the multiple buttons and bind that enable rule to the respective button commands. You no need to pass the button label to it because the actual logic will be handled in the enable rule.

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Is there any supported way to pass dynamic value(label) of ribbon button as parameter to enable rule ?

    Hi Arun,

    There is no CRM Parameter available for this so a possible work around could be have custom java script rule to implement your requirement.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Is there any supported way to pass dynamic value(label) of ribbon button as parameter to enable rule ?

    Hi @Mahendra,

    I just wanted to create one enable rule where I can pass button name  or label name dynamically, so that I can add this rule with other button too. So, is there any way to pass dynamic label name  to CRM parameter.

  • Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Is there any supported way to pass dynamic value(label) of ribbon button as parameter to enable rule ?

    Hi,

    What is your requirement do you want to enable disable based on specific label ?? you should be able to use custom js rule where you can check field but keep in mind to access field label there is no supported/direct way and return true/false to enable rule.

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans