locked
Issues Importing new Ribbon Customization RRS feed

  • Question

  • Hi, I've seen a few questions related to this issue, but none that resolve it, so I'm posting it here. I have a simple custom button I wish to place on the Contact ribbon. I created a new solution and included the Ribbon along with a few select entities related to Contacts. I customized the Ribbon, per the code posted below. Now when I import it, I get the following 3 errors, all related to the ActivityPointer entity (I did not include any Activity entities in my initial Solution, so I'm not sure if that matters):

    The ribbon item 'RibbonSolution.contact.grid.CreateCandidateVote.CustomAction' is dependent on ribbon control id='Mscrm.HomepageGrid.contact.MainTab.Collaborate.Controls'.

    The ribbon item 'RibbonSolution.contact.form.CreateCandidateVote.CustomAction' is dependent on ribbon control id='Mscrm.Form.contact.MainTab.Collaborate.Controls'.

    The ribbon item 'RibbonSolution.contact.grid.CreateCandidateVote.CustomAction' is dependent on ribbon control id='Mscrm.HomepageGrid.contact.MainTab.Collaborate.Controls'.

    Here's my RibbonDiffXml code. Any ideas what I may be missing?

       <RibbonDiffXml>
        <CustomActions>
         <CustomAction Id="RibbonSolution.contact.grid.CreateCandidateVote.CustomAction" 
                Location="Mscrm.HomepageGrid.contact.MainTab.Collaborate.Controls._children" 
                Sequence="41">
          <CommandUIDefinition>
           <Button Id="RibbonSolution.contact.grid.CreateCandidateVote.Button" 
               Command="RibbonSolution.contact.grid.CreateCandidateVote.Command" 
               LabelText="$LocLabels:RibbonSolution.contact.CreateCandidateVote.LabelText" 
               ToolTipTitle="$LocLabels:RibbonSolution.contact.CreateCandidateVote.LabelText" 
               ToolTipDescription="$LocLabels:RibbonSolution.contact.CreateCandidateVote.ToolTip" 
               TemplateAlias="o1" 
               Image16by16="$webresource:new_VotingIcon_16x16.png" 
               Image32by32="$webresource:new_VotingIcon_32x32.png" />
          </CommandUIDefinition>
         </CustomAction>
         <CustomAction Id="RibbonSolution.contact.form.CreateCandidateVote.CustomAction" 
                Location="Mscrm.Form.contact.MainTab.Collaborate.Controls._children" 
                Sequence="34">
          <CommandUIDefinition>
           <Button Id="RibbonSolution.contact.form.CreateCandidateVote.Button" 
               Command="RibbonSolution.contact.form.CreateCandidateVote.Command" 
               LabelText="$LocLabels:RibbonSolution.contact.CreateCandidateVote.LabelText" 
               ToolTipTitle="$LocLabels:RibbonSolution.contact.CreateCandidateVote.LabelText" 
               ToolTipDescription="$LocLabels:RibbonSolution.contact.CreateCandidateVote.ToolTip" 
               TemplateAlias="o1" Image16by16="$webresource:new_VotingIcon_16x16.png" 
               Image32by32="$webresource:new_VotingIcon_32x32.png" />
          </CommandUIDefinition>
         </CustomAction>
        </CustomActions>
        <Templates>
         <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
        </Templates>
        <CommandDefinitions>
         <CommandDefinition Id="RibbonSolution.contact.grid.CreateCandidateVote.Command">
          <EnableRules>
           <EnableRule Id="RibbonSolution.contact.WebClient.EnableRule" />
           <EnableRule Id="RibbonSolution.contact.grid.OneSelected.EnableRule" />
          </EnableRules>
          <DisplayRules>
           <DisplayRule Id="RibbonSolution.contact.WebClient.DisplayRule" />
          </DisplayRules>
          <Actions>
           <JavaScriptFunction Library="$webresource:new_createCandidateVote.js" 
                     FunctionName="createCandidateVote" />
          </Actions>
         </CommandDefinition>
         <CommandDefinition Id="RibbonSolution.contact.form.CreateCandidateVote.Command">
          <EnableRules>
           <EnableRule Id="RibbonSolution.contact.WebClient.EnableRule" />
           <EnableRule Id="RibbonSolution.contact.form.NotNew.EnableRule" />
          </EnableRules>
          <DisplayRules>
           <DisplayRule Id="RibbonSolution.contact.form.FormStateNotNew.DisplayRule" />
           <DisplayRule Id="RibbonSolution.contact.WebClient.DisplayRule" />
          </DisplayRules>
          <Actions>
           <JavaScriptFunction Library="$webresource:new_createCandidateVote.js" 
                     FunctionName="createCandidateVote" />
          </Actions>
         </CommandDefinition>
        </CommandDefinitions>
        <RuleDefinitions>
         <TabDisplayRules />
         <DisplayRules>
          <DisplayRule Id="RibbonSolution.contact.form.FormStateNotNew.DisplayRule">
           <FormStateRule State="Create" 
                   InvertResult="true" />
          </DisplayRule>
          <DisplayRule Id="RibbonSolution.contact.WebClient.DisplayRule">
           <CrmClientTypeRule Type="Web" />
          </DisplayRule>
         </DisplayRules>
         <EnableRules>
          <EnableRule Id="RibbonSolution.contact.WebClient.EnableRule">
           <CrmClientTypeRule Type="Web" />
          </EnableRule>
          <EnableRule Id="RibbonSolution.contact.form.NotNew.EnableRule">
           <FormStateRule State="Create" 
                   InvertResult="true" />
          </EnableRule>
          <EnableRule Id="RibbonSolution.contact.grid.OneSelected.EnableRule">
           <SelectionCountRule AppliesTo="SelectedEntity" 
                     Maximum="1" 
                     Minimum="1" />
          </EnableRule>
         </EnableRules>
        </RuleDefinitions>
        <LocLabels>
         <LocLabel Id="RibbonSolution.contact.CreateCandidateVote.LabelText">
          <Titles>
           <Title languagecode="1033" 
               description="Vote for this Candidate" />
          </Titles>
         </LocLabel>
         <LocLabel Id="RibbonSolution.contact.CreateCandidateVote.ToolTip">
          <Titles>
           <Title languagecode="1033" 
               description="Creates a new Vote for the Candidate" />
          </Titles>
         </LocLabel>
        </LocLabels>
       </RibbonDiffXml>
    

     

     

    Tuesday, March 15, 2011 1:38 PM

Answers

  • I figured it out. My code was in the wrong spot. It was under the Activities entity, not the contact entity. I fixed and the button now appears as expected.
    --Dodd
    • Marked as answer by MDodd73 Wednesday, March 16, 2011 10:01 PM
    Wednesday, March 16, 2011 10:00 PM

All replies

  • I figured it out. My code was in the wrong spot. It was under the Activities entity, not the contact entity. I fixed and the button now appears as expected.
    --Dodd
    • Marked as answer by MDodd73 Wednesday, March 16, 2011 10:01 PM
    Wednesday, March 16, 2011 10:00 PM
  • Dude,

     

    Where do you define the entity contact?

     

    Thanks,

    Thursday, April 28, 2011 10:38 PM