CRM 2011 Ribbon DisplayRule ValueRule checks for null

Quickly, I do not see direct answers, so I thought I would ask. (Here is the same question asked on the microsoft social site , and it also remains unanswered)

If I have DisplayRule and ValueRule, how can I check for null? This proposed solution below does not seem to work (according to a related question):

<DisplayRule Id="new.incident.form.IsNotRelatedToY.DisplayRule"> <ValueRule Field="YId" Value="null" InvertResult="true" /> </DisplayRule> 

Does it depend on the type of field? If so, I need it to work in two separate cases when YId is an entity reference, and also when YId is a string. I believe that "null" cannot work for a string, because "null" is a valid string.

Does anyone have a working example?

EDIT: It looks like the ValueRule documentation has nothing about itself.

+6
source share
2 answers

Good question, but unfortunately I don’t think there is a good answer here because I think it is a mistake. If you use "null" as the value of the string attribute in the ValueRule for EnableRule , you will see that the button is actually turned on (or disabled depending on what you set for InvertResult ). This just doesn't work for DisplayRule s. (My best guess: they just put more effort into developing EnableRules instead of DisplayRules , as indicated in your link, there is no support for CustomRule for DisplayRules , although it exists for EnableRules .)

I would write a bug report, but Microsoft Connect is still accepting “suggestions” for Dynamics CRM.

+7
source

This is fixed in CRM 2013. I just tested it and am working

+2
source

Source: https://habr.com/ru/post/915222/


All Articles