Search code examples
dynamics-crm-2011ribbonx

Dynamics CRM 2011 RibbonXML - ValueRule for yes/no field


I'm trying to create a <ValueRule> in RibbonXML for a two options (yes/no) field, for use in a <DisplayRule> that should show a button if the condition is true. However, I can't get it working the way I want.

<ValueRule Field="somefield" Value="(what do I put here to represent "yes"?)" />

I've tried with 1, true, Yes and other variations in casings, but no matter what I enter, the rule evaluates to false and the button is hidden. How can I get this to work?


Solution

  • I found my error - the field was missing from the form, so the rule didn't find anything to match. Added the field to the form, and 0/1 work correctly as values.