現在、フォームのチェックボックスの値に基づいてカスタムリボンボタンを表示/非表示にしようとしています。
<EnableRule>
作成したiでXMLを正常に機能させることができましたが、を使用しようとする<DisplayRule>
と、フィールドに入力した値に関係なく、問題のボタンが消えnew_is_trading
ます。
以下に私のXMLを示します。
<CommandUIDefinition>
<Group Id="Mscrm.Form.account.CustomGroup.Group"
Command="Mscrm.Form.account.CustomGroup.Command"
Title="Client Commands"
Sequence="51"
Template="Mscrm.Templates.Flexible2">
<Controls Id="Mscrm.Form.account.CustomGroup.Controls">
<Button Id="Mscrm.Form.account.CustomGroup.Button.A"
Command="Mscrm.Form.account.CustomGroup.Button.A.Command"
Sequence="10"
LabelText="Custom Button"
ToolTipTitle="Description"
ToolTipDescription="Should only be shown if this account is trading"
TemplateAlias="o1"
Image16by16="/_imgs/ribbon/CustomEntity_16.png"
Image32by32="/_imgs/ribbon/CustomEntity_32.png" />
</Controls>
</Group>
</CommandUIDefinition>
次に、私のルール定義では:
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules>
<DisplayRule Id="Mscrm.Form.account.CustomDisplayRules.DisplayIfClient">
<ValueRule Field="new_is_trading" Value="true" />
</DisplayRule>
</DisplayRules>
<EnableRules>
<EnableRule Id="Mscrm.Form.account.CustomEnableRules.EnableIfClient">
<ValueRule Field="new_is_trading" Value="true" />
</EnableRule>
</EnableRules>
</RuleDefinitions>
繰り返しEnableRule
ますが、私の動作は正常ですが、DisplayRule
何らかの理由で動作しません。