In my lead home page, there is a custom button. The enable rule for that button is:
<EnableRule Id="enableruleid">
<SelectionCountRule AppliesTo="SelectedEntity" Minimum="1" Maximum="1"></SelectionCountRule>
<CustomRule FunctionName="functionname" Library="$Webresource:myjavascript.js">
<CrmParameter Value="SelectedControlSelectedItemIds" />
</CustomRule>
</EnableRule>
The javascript working fine only for the first time select a record, when you select another record, the javascript doesn't called.
For example, I select record A, the button is enabled and it's fine; and then I select record B, the button should be disabled, but it's not, it still enabled.
But if I select record B first, the ribbon is disabled as I wish, and then I select record A, the button still disabled.
Anyone know why it like this?
Any suggestions?
Update: If I select multiple records, and then un-select most of them only left one, the enable rule works. Or I select one record --> un-select it --> select another record, it also works. The problem only occurs when I directly click on the "row" instead of the checkbox.