CRM2011: Home page ribbon enable rule doesn't work properly

Posted by nixjojo on Stack Overflow See other posts from Stack Overflow or by nixjojo
Published on 2013-07-02T11:02:16Z Indexed on 2013/07/02 11:05 UTC
Read the original article Hit count: 169

Filed under:

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"></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.

© Stack Overflow or respective owner

Related posts about dynamics-crm-2011