Bug with the EnableRule of a custom button in the ribbon of a subgrid

Вопрос Bug with the EnableRule of a custom button in the ribbon of a subgrid

  • 2012년 1월 20일 금요일 오후 3:22
     
      코드 있음

    Hello,

    Since I had no response on the "CRM developper" thread, i try in the principal thread. 

    I have a form which includes a subgrid based on a linked entity .

    I have  a custom button that appear in the rbbon  when I am in the context of my linked entity  and which is activated when I select one and only one row.
    The bug I see is that when I click precisely on the checkbox of the row, the event that enable or disable the custom button does not fire on the "onfocus" but on the "onblur" event, precisely on the loss of focus by the checkox, which is very anoying.

    This bug does not occur the associated view that you can access by clicking the left panel of the form but only in a subgrid of a form.

    For information, i'm on CRM 2011 OnPremise rollup 5.

    Can you confirm if you also see this bug on your platforms?

    In case, I attach a part of the ribbondiffxml :

     

     

    <RibbonDiffXml>
      <CustomActions>
        <CustomAction Id="Ebs.ebs_dossier.subgrid.Delib.CustomAction" Location="Mscrm.SubGrid.ebs_dossier.MainTab.Collaborate.Controls._children" Sequence="5">
          <CommandUIDefinition>
            <Button Id="Ebs.ebs_dossier.subgrid.Delib.Button" Command="Ebs.ebs_dossier.subgrid.Delib.Command" LabelText="$LocLabels:Ebs.ebs_dossier.Delib.LabelText" ToolTipTitle="$LocLabels:Ebs.ebs_dossier.Delib.LabelText" ToolTipDescription="$LocLabels:Ebs.ebs_dossier.Delib.ToolTip" TemplateAlias="o1" Image16by16="$webresource:ebs_delib16" Image32by32="$webresource:ebs_delib32" />
          </CommandUIDefinition>
        </CustomAction>
      </CustomActions>
      <Templates>
        <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
      </Templates>
      <CommandDefinitions>
        <CommandDefinition Id="Ebs.ebs_dossier.subgrid.Delib.Command">
          <EnableRules>
            <EnableRule Id="Ebs.ebs_dossier.subgrid.OneSelected.EnableRule" />
          </EnableRules>
          <DisplayRules />
          <Actions>
            <JavaScriptFunction Library="$webresource:ebs_delib" FunctionName="delib">
              <CrmParameter Value="SelectedControlSelectedItemIds" />
            </JavaScriptFunction>
          </Actions>
        </CommandDefinition>
      </CommandDefinitions>
      <RuleDefinitions>
        <TabDisplayRules />
        <DisplayRules />
        <EnableRules>
          <EnableRule Id="Ebs.ebs_dossier.subgrid.OneSelected.EnableRule">
    
            <SelectionCountRule AppliesTo="SelectedEntity" Maximum="1" Minimum="1" />
          </EnableRule>
        </EnableRules>
      </RuleDefinitions>
      <LocLabels>
        ...
      </LocLabels>
    </RibbonDiffXml>
    
    


     

    Thank you,

    Alex

     

모든 응답

  • 2012년 1월 23일 월요일 오후 6:18
     
     

    Hi Alex,

                    I confirm this issue doesn’t happen on my platform, could you try replacing the line you have with

    <SelectionCountRule AppliesTo="SelectedEntity" Maximum="1" Minimum="1" />

    With

    <SelectionCountRule Maximum="1" Minimum="1" AppliesTo="SelectedEntity" InvertResult="false" Default="true" />

    Let me know if that helps.

     


    Regards,
    Damian Sinay
  • 2012년 1월 25일 수요일 오전 9:46
     
     

    Thanks Damian but no changes with your proposition.

    I post captures to show precisely how the bug happen on my platform.

     

    On the 1st image, I click precisely on the checkbox and we can see that the custom button isn't enabled.

    On the 2nd image, I leave the checkox by clicking on an other part of the form, It's only on this way that the button appear enabled.


  • 2012년 4월 24일 화요일 오후 12:29
     
     

    We have exactly the same issue, it's not difficult to reproduce.  Has anyone got any further with this...?

    Thanks

    Matt

  • 2012년 4월 24일 화요일 오후 12:34
     
     

    Hello MattTrinder,

    what is your rollup version?

    I'm still in RU5. Perhaps, it is now fix in RU6 or 7.

    Regards,

    Alex