Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Ribbon Customization

Posted on by 15

Hello

I want to show a button only when

  •  Field have specific value
  • Javascript Function Return ture

and this is AND condition not OR

mean when field value is "abc" and javascript function return true

How can i do this

because enable rule have only OR condition not AND

Thanks

*This post is locked for comments

  • kashiffayyaz Profile Picture
    kashiffayyaz 15 on at
    RE: Ribbon Customization

    Yes ur right thanks for detail answer and information

  • kashiffayyaz Profile Picture
    kashiffayyaz 15 on at
    RE: Ribbon Customization

    Oh Yes i forgot this.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Ribbon Customization

    why not put the field value check inside the JS function as well?

  • Suggested answer
    Andreas Cieslik Profile Picture
    Andreas Cieslik 9,265 on at
    RE: Ribbon Customization

    Hi,

    this tells us differently:

    https://msdn.microsoft.com/en-us/library/gg334682.aspx

    >> Control when ribbon elements are enabled

    Enable rules are intended to be re-used. By defining them with rule definitions, you can use the same enable rule for many command definitions. When more than one enable rule is defined for a command definition, all of the enable rules must evaluate as true for the ribbon element to be enabled.

    All Enable rules provide an optional attribute to specify whether the default value of the rule is true or false and an optional InvertResult attribute to allow for returning a negative result when the item being tested returns true. <<

    Are you sure the conditions are right in your case?

    Cheers,

    Andreas

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