CRM 2011功能区DisplayRule ValueRule检查是否为空 [英] CRM 2011 Ribbon DisplayRule ValueRule check for null

查看:119
本文介绍了CRM 2011功能区DisplayRule ValueRule检查是否为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

快速回答,我看不到任何直接答案,所以我想问一下。 (以下是在Microsoft社交网络上问了同样的问题网站,并且也没有答案)

Quick one, I don't see any direct answers out there so I thought I'd ask. (Here is the same question asked on the microsoft social site and it is unanswered as well)

如果我有DisplayRule和ValueRule,该如何检查null?以下建议的解决方案显然不起作用(根据链接的问题):

If I have a DisplayRule and a ValueRule in that, how can I check for null? This suggested solution below apparently doesn't work (according to the linked question):

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

这是否取决于字段的类型?如果是这样,当YId是实体引用以及YId是字符串时,我需要它在两种单独的情况下工作。我认为 null不能用于字符串,因为 null是有效的字符串。

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

任何人都有有效的示例吗?

Anyone have a working example?

编辑:看起来 ValueRule文档具有

推荐答案

很好的问题,但是不幸的是,我认为这里没有任何好的答案,因为我认为这是一个很好的答案。错误。如果在 ValueRule 中使用 null 作为字符串属性的值EnableRule ,您会看到该按钮实际上已启用(或禁用,具体取决于您为 InvertResult 设置的内容)。它对于 DisplayRule 无效。 (我最好的猜测是,他们只是在开发 EnableRules 而不是 DisplayRules 上付出了更多的努力;如您的链接中所述,尽管 EnableRules DisplayRules CustomRule 也不支持$ c>。)

Good question, but unfortunately I don't think there's any good answer here because I think it's a bug. If you use "null" as the value for a string attribute in a ValueRule for an EnableRule, you'll see that the button in fact becomes enabled (or disabled depending on what you set for InvertResult). It just doesn't work for DisplayRules. (My best guess is they just put more effort into developing EnableRules instead of DisplayRules; as mentioned in your link, there's no support for CustomRules for DisplayRules either, though it exists for EnableRules.)

我提交了错误报告,但Microsoft Connect仍仅接受Dynamics CRM的建议。

I'd file a bug report, but Microsoft Connect is still only accepting "suggestions" for Dynamics CRM.

这篇关于CRM 2011功能区DisplayRule ValueRule检查是否为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆