在上一篇中,我用一个例子,简单介绍了如何添加Ribbon Button,以及如何理解RibbonDiffXml,对这方面还不清楚的,可以先看看这篇博文:Dynamics CRM 2015-Form之添加Ribbon Button
接着上一回的讲,在日常开发中,我们不仅需要添加Button,还需要根据一些Rule,对Button进行控制,比如Create Record的时候,Button是Disable的,然后当满足一定条件的时候,Button变成Enable。
下面就说说如何配置。
上一篇我们说到了使用<CommandDefinition><Actions></CommandDefinition>定义Button的点击事件,这里我们需要用到<EnableRule />节点。
<CommandDefinitions>
<CommandDefinition Id="***">
<EnableRules>
<EnableRule Id="***.CustomRule" />
<EnableRule Id="***.FormStateRule" />
&n

