Hi All ,
I have a 2 custom button which are mutually exclusive. So only one button shoudl appear at a time depending on an optionSet Value in the Form .
So Enable rule 1 : Field="X"
Value="0" InvertResult="false"
Enable rule 1 : Field="X"
Value="0" InvertResult="true" .
This is not working anymore on Dync 365 ( 8.2)
After some checkings , i decided to check if this is a bug by trying to replicate this in a Vanilla trial installation.
So i chose the opportunity Form , created 2 buttons as described :
- one button is displayed when the "Purchase Process" (option Set Field) = 0 (Individual)
second button is displayed when the "Purchase Process" (option Set Field) != 0 (all other possible values).
Here's the Ribbon xml Diff
<?xml version="1.0" encoding="utf-16"?>
<RibbonDiffXml xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CustomActions>
<CustomAction Id="cla.opportunity.Reverse.Button.CustomAction" Location="Mscrm.Form.opportunity.MainTab.Save.Controls._children" Sequence="85">
<CommandUIDefinition>
<Button Alt="$LocLabels:cla.opportunity.Reverse.Button.Alt" Command="cla.opportunity.Reverse.Command" Id="cla.opportunity.Reverse.Button" LabelText="$LocLabels:cla.opportunity.Reverse.Button.LabelText" Sequence="85" TemplateAlias="o2" ToolTipTitle="$LocLabels:cla.opportunity.Reverse.Button.ToolTipTitle" ToolTipDescription="$LocLabels:cla.opportunity.Reverse.Button.ToolTipDescription" />
</CommandUIDefinition>
</CustomAction>
<CustomAction Id="cla.opportunity.Value.Button.CustomAction" Location="Mscrm.Form.opportunity.MainTab.Save.Controls._children" Sequence="95">
<CommandUIDefinition>
<Button Alt="$LocLabels:cla.opportunity.Value.Button.Alt" Command="cla.opportunity.Value.Command" Id="cla.opportunity.Value.Button" LabelText="$LocLabels:cla.opportunity.Value.Button.LabelText" Sequence="95" TemplateAlias="isv" ToolTipTitle="$LocLabels:cla.opportunity.Value.Button.ToolTipTitle" ToolTipDescription="$LocLabels:cla.opportunity.Value.Button.ToolTipDescription" />
</CommandUIDefinition>
</CustomAction>
</CustomActions>
<Templates>
<RibbonTemplates Id="Mscrm.Templates" />
</Templates>
<CommandDefinitions>
<CommandDefinition Id="cla.opportunity.Reverse.Command">
<EnableRules>
<EnableRule Id="cla.opportunity.Reverse.EnableRule" />
</EnableRules>
<DisplayRules />
<Actions>
<Url Address="https://www.microsoft.com" WinMode="0" PassParams="false" />
</Actions>
</CommandDefinition>
<CommandDefinition Id="cla.opportunity.Value.Command">
<EnableRules>
<EnableRule Id="cla.opportunity.Value.EnableRule" />
</EnableRules>
<DisplayRules />
<Actions>
<Url Address="https://www.microsoft.com" WinMode="0" PassParams="false" />
</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules />
<EnableRules>
<EnableRule Id="cla.opportunity.Reverse.EnableRule">
<ValueRule Field="purchaseprocess" Value="0" Default="true" InvertResult="true" />
</EnableRule>
<EnableRule Id="cla.opportunity.Value.EnableRule">
<ValueRule Field="purchaseprocess" Value="0" Default="false" InvertResult="false" />
</EnableRule>
</EnableRules>
</RuleDefinitions>
<LocLabels>
<LocLabel Id="cla.opportunity.Reverse.Button.LabelText">
<Titles>
<Title description="Reverse" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="cla.opportunity.Reverse.Button.ToolTipTitle">
<Titles>
<Title description="Reverse" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="cla.opportunity.Reverse.Button.ToolTipDescription">
<Titles>
<Title description="Reverse" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="cla.opportunity.Reverse.Button.Alt">
<Titles>
<Title description="Reverse" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="cla.opportunity.Value.Button.LabelText">
<Titles>
<Title description="Value" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="cla.opportunity.Value.Button.ToolTipTitle">
<Titles>
<Title description="Value" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="cla.opportunity.Value.Button.ToolTipDescription">
<Titles>
<Title description="Value" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="cla.opportunity.Value.Button.Alt">
<Titles>
<Title description="Value" languagecode="1033" />
</Titles>
</LocLabel>
</LocLabels>
</RibbonDiffXml>
Regards,
*This post is locked for comments