locked
Marketing Dashboarad - MS CRM 2011 RRS feed

  • Question

  • Hi,

    just wondering in "Marketing Dashboard" why there is no "New Campaign" ribbon button available when you select campaign area.

    any idea??

    thanks

    Thursday, September 15, 2011 1:46 AM

Answers

  • Ok Now, I do understand what do you mean. It does not make sense.

    The only explanation I can come up with is

    ListTools Tab of crm2011 kicks in when you click on subgrid of any entity form.

    When you click on activities subgrid on any entity (dashboard, account or contact), you will see ListTools tab on the ribbon turn into that activity ribbon.

    If you click on "campaigns grid" on account form or contact form, you won't see a new button either. The explain can be there is no direct 1:N relationship between any other entity and campaigns. So they did not new button on subgrid toolbar or (ListTools) Tab of the ribbon.

    I did some digging in campaign ribbon I find this

    <DisplayRules>

              <DisplayRule Id="Mscrm.ShowForOneToManyGrids" />

              <DisplayRule Id="Mscrm.AppendToPrimary" />

              <DisplayRule Id="Mscrm.CreateSelectedEntityPermission" />

              <DisplayRule Id="Mscrm.AppendSelected" />

              <DisplayRule Id="Mscrm.HideAddNewForChildEntities" />

     </DisplayRules>

    If any of this above mentioned display return false you can't see the button.

    The highlighted condition never return true as i don't think there are any N:1 relationship exist on campaign to any major entity except users and business units etc(system entities).

     

     

    I hope that helps.

     


    Amreek singh Senior CRM Consultant CDC Praxa Sydney,Australia http://mscrmshop.blogspot.com/
    • Marked as answer by mehul512 Thursday, September 15, 2011 5:58 AM
    • Unmarked as answer by mehul512 Thursday, September 15, 2011 5:59 AM
    • Marked as answer by mehul512 Thursday, September 15, 2011 11:03 PM
    Thursday, September 15, 2011 5:07 AM
  • Finally, here is the answer/code:

    Just export the ribon content of "Campaign" entity and replace below code in 'customization' file and import it back.

    <ImportExportXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <Entities>
        <Entity>
          <Name LocalizedName="Campaign" OriginalName="Campaign">Campaign</Name>
          <ObjectTypeCode>4400</ObjectTypeCode>            
          <RibbonDiffXml>
            <CustomActions >
    			<CustomAction Id="Sample.SubGrid.campaign.CustomTab.CustomAction" Location="Mscrm.SubGrid.campaign.ContextualTabs._children" Sequence="40">
                <CommandUIDefinition>
                  <Tab 
    			  Id="Sample.SubGrid.campaign.CustomTab" 
    			  Command="Sample.SubGrid.campaign.CustomTab"  
    			  Title="$LocLabels:Sample.campaign.CustomTab.Title" 
    			  Description="$LocLabels:Sample.campaign.CustomTab.Description" 
    			  Sequence="500">			  
    				<Scaling Id="Sample.SubGrid.campaign.CustomTab.Scaling">
                      <MaxSize Id="Sample.SubGrid.campaign.CustomTab.FirstGroup.MaxSize" GroupId="Sample.SubGrid.campaign.CustomTab.FirstGroup" Sequence="10" Size="LargeMedium" />
                    </Scaling>
                    <Groups Id="Sample.SubGrid.campaign.CustomTab.Groups">
                      <Group 
    				  Id="Sample.SubGrid.campaign.CustomTab.FirstGroup" 
    				  Command="Sample.SubGrid.campaign.FirstGroup" 
    				  Sequence="10" 
    				  Title="$LocLabels:Sample.campaign.CustomTab.FirstGroup.Title"
    				  Template="Mscrm.Templates.3.3">
                        <Controls Id="Sample.SubGrid.campaign.CustomTab.FirstGroup.Controls">
                          <Button 
    					  Id="Sample.SubGrid.campaign.CustomTab.FirstGroup.FirstButton" 
    					  ToolTipTitle="$LocLabels:Sample.campaign.CustomTab.FirstGroup.FirstButton.LabelText" 
    					  ToolTipDescription="$LocLabels:Sample.campaign.CustomTab.FirstGroup.FirstButton.ToolTipDescription" 
    					  Command="Sample.SubGrid.campaign.FirstButton" 
    					  Sequence="10" 
    					  LabelText="$LocLabels:Sample.campaign.CustomTab.FirstGroup.FirstButton.LabelText" 
    					  Alt="$LocLabels:Sample.campaign.CustomTab.FirstGroup.FirstButton.LabelText"
    					  Image16by16="/_imgs/Ribbon/NewRecord_16.png" 
    					  Image32by32="/_imgs/Ribbon/NewRecord32.png" 
    					  TemplateAlias="o1" />					  
                        </Controls>
                      </Group>
                    </Groups>
                  </Tab>
                </CommandUIDefinition>
              </CustomAction>
    		</CustomActions>
            <Templates>
              <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
            </Templates>
            <CommandDefinitions >
    			<CommandDefinition Id="Sample.SubGrid.campaign.CustomTab">
                <EnableRules>
                  <EnableRule Id="Mscrm.Enabled " />
                </EnableRules>
                <DisplayRules />                          
                <Actions />
              </CommandDefinition>		  
    		  <CommandDefinition Id="Sample.SubGrid.campaign.FirstGroup">
                <EnableRules>
                  <EnableRule Id="Mscrm.Enabled " />
                </EnableRules>
                <DisplayRules />                          
                <Actions />
              </CommandDefinition>		  
    		  <CommandDefinition Id="Sample.SubGrid.campaign.FirstButton">
                <EnableRules>
                  <EnableRule Id="Mscrm.Enabled " />
                </EnableRules>
                <DisplayRules >	
    			</DisplayRules>
                <Actions >
    				<Url Address = "/main.aspx?etn=campaign&amp;pagetype=entityrecord" />				
    			</Actions >              			
              </CommandDefinition>
    		</CommandDefinitions >
            <RuleDefinitions>
              <TabDisplayRules>            
                <TabDisplayRule TabCommand="Sample.SubGrid.campaign.CustomTab">
                  <EntityRule EntityName="campaign" Context="SubGridStandard" />
                  <EntityRule EntityName="campaign" Context="SubGridAssociated" />
                </TabDisplayRule>
              </TabDisplayRules>
              <DisplayRules >
    			
    		  </DisplayRules>
              <EnableRules />
            </RuleDefinitions>
            <LocLabels>
    		  <LocLabel Id="Sample.campaign.CustomTab.Title">
                <Titles>
                  <Title languagecode="1033" description="Custom Tab" />
                </Titles>
              </LocLabel>
    		  <LocLabel Id="Sample.campaign.CustomTab.Description">
                <Titles>
                  <Title languagecode="1033" description="A custom tab for the campaign entity." />
                </Titles>
              </LocLabel>
    		  <LocLabel Id="Sample.campaign.CustomTab.FirstGroup.Title">
                <Titles>
                  <Title languagecode="1033" description="Record Group" />
                </Titles>
              </LocLabel>
    		  <LocLabel Id="Sample.campaign.CustomTab.FirstGroup.FirstButton.LabelText">
                <Titles>
                  <Title languagecode="1033" description="New Campaign" />
                </Titles>
              </LocLabel>
    		  <LocLabel Id="Sample.campaign.CustomTab.FirstGroup.FirstButton.ToolTipDescription">
                <Titles>
                  <Title languagecode="1033" description="Click here to create a new campaign." />
                </Titles>
              </LocLabel>
    		</LocLabels >
          </RibbonDiffXml>
        </Entity>
      </Entities>  
      <Languages>
        <Language>1033</Language>
      </Languages>
    </ImportExportXml>
    

     

    Expected Output:

    enjoy :)

     

    • Marked as answer by mehul512 Friday, September 16, 2011 6:08 AM
    Friday, September 16, 2011 6:08 AM

All replies

  • The default behavior of the CRM2011 application Ribbon is that ribbon changes based on the entity selected.

    For e.g if you click on "Activities" underneath Dashboards, the ribbon will display email, task, appointment button etc.

    Dashboard is an entity and when you click dashboards, it will display the button related to dashboard entity. like "New" to create a new dashboard etc.

    "Marketing Dashboard" is just a record of entity dashboard not an entity in its own right.

     

    I believe you can add a custom button "Add Compaign" to application ribbon if you would like. 

     

    I hope this helps.


    Amreek singh Senior CRM Consultant CDC Praxa Sydney,Australia http://mscrmshop.blogspot.com/
    • Proposed as answer by Amreek Singh Thursday, September 15, 2011 3:08 AM
    Thursday, September 15, 2011 3:08 AM
  • Thanks Amreek. However the question is when we click on 'Activities' (or if we have other entity such as 'contact') as a list item in dashboard, It displays the buttons related to those entity i.e. New, Update ...etc. then why in case of 'Campaign' it doesn't display 'New" to create a campaign record? (though 'Edit' campaign record is available).

    Hope i try to explain my question more in detail.

     

    Thursday, September 15, 2011 4:31 AM
  • Ok Now, I do understand what do you mean. It does not make sense.

    The only explanation I can come up with is

    ListTools Tab of crm2011 kicks in when you click on subgrid of any entity form.

    When you click on activities subgrid on any entity (dashboard, account or contact), you will see ListTools tab on the ribbon turn into that activity ribbon.

    If you click on "campaigns grid" on account form or contact form, you won't see a new button either. The explain can be there is no direct 1:N relationship between any other entity and campaigns. So they did not new button on subgrid toolbar or (ListTools) Tab of the ribbon.

    I did some digging in campaign ribbon I find this

    <DisplayRules>

              <DisplayRule Id="Mscrm.ShowForOneToManyGrids" />

              <DisplayRule Id="Mscrm.AppendToPrimary" />

              <DisplayRule Id="Mscrm.CreateSelectedEntityPermission" />

              <DisplayRule Id="Mscrm.AppendSelected" />

              <DisplayRule Id="Mscrm.HideAddNewForChildEntities" />

     </DisplayRules>

    If any of this above mentioned display return false you can't see the button.

    The highlighted condition never return true as i don't think there are any N:1 relationship exist on campaign to any major entity except users and business units etc(system entities).

     

     

    I hope that helps.

     


    Amreek singh Senior CRM Consultant CDC Praxa Sydney,Australia http://mscrmshop.blogspot.com/
    • Marked as answer by mehul512 Thursday, September 15, 2011 5:58 AM
    • Unmarked as answer by mehul512 Thursday, September 15, 2011 5:59 AM
    • Marked as answer by mehul512 Thursday, September 15, 2011 11:03 PM
    Thursday, September 15, 2011 5:07 AM
  • Thanks Amreek, so only way to get 'New" button for "Campaign" listed in dashboard is custom button in the ribbon or any more suggestion?
    Thursday, September 15, 2011 6:00 AM
  • Yes, the button is already there in campaign ribbon, You just need to change the display and enable rules.

    Here is link on how to enable and disable the out of box button.

    http://mscrmshop.blogspot.com/2011/08/enabledisable-out-of-box-buttons-based.html

    Its same thing with the display rule. In your scenario, you may need to remove the existing rule instead of adding new. but it will create new button everywhere where ever you use campaign grid.

    The other option is create a custom new camapign button.

    To add a button to sub grids here is a link

    http://www.youtube.com/watch?v=CQ7knA4vpvM

    I hope this helps.

     


    Amreek singh Senior CRM Consultant CDC Praxa Sydney,Australia http://mscrmshop.blogspot.com/
    Thursday, September 15, 2011 11:07 AM
  • Thanks Amreek.
    Thursday, September 15, 2011 11:03 PM
  • Finally, here is the answer/code:

    Just export the ribon content of "Campaign" entity and replace below code in 'customization' file and import it back.

    <ImportExportXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <Entities>
        <Entity>
          <Name LocalizedName="Campaign" OriginalName="Campaign">Campaign</Name>
          <ObjectTypeCode>4400</ObjectTypeCode>            
          <RibbonDiffXml>
            <CustomActions >
    			<CustomAction Id="Sample.SubGrid.campaign.CustomTab.CustomAction" Location="Mscrm.SubGrid.campaign.ContextualTabs._children" Sequence="40">
                <CommandUIDefinition>
                  <Tab 
    			  Id="Sample.SubGrid.campaign.CustomTab" 
    			  Command="Sample.SubGrid.campaign.CustomTab"  
    			  Title="$LocLabels:Sample.campaign.CustomTab.Title" 
    			  Description="$LocLabels:Sample.campaign.CustomTab.Description" 
    			  Sequence="500">			  
    				<Scaling Id="Sample.SubGrid.campaign.CustomTab.Scaling">
                      <MaxSize Id="Sample.SubGrid.campaign.CustomTab.FirstGroup.MaxSize" GroupId="Sample.SubGrid.campaign.CustomTab.FirstGroup" Sequence="10" Size="LargeMedium" />
                    </Scaling>
                    <Groups Id="Sample.SubGrid.campaign.CustomTab.Groups">
                      <Group 
    				  Id="Sample.SubGrid.campaign.CustomTab.FirstGroup" 
    				  Command="Sample.SubGrid.campaign.FirstGroup" 
    				  Sequence="10" 
    				  Title="$LocLabels:Sample.campaign.CustomTab.FirstGroup.Title"
    				  Template="Mscrm.Templates.3.3">
                        <Controls Id="Sample.SubGrid.campaign.CustomTab.FirstGroup.Controls">
                          <Button 
    					  Id="Sample.SubGrid.campaign.CustomTab.FirstGroup.FirstButton" 
    					  ToolTipTitle="$LocLabels:Sample.campaign.CustomTab.FirstGroup.FirstButton.LabelText" 
    					  ToolTipDescription="$LocLabels:Sample.campaign.CustomTab.FirstGroup.FirstButton.ToolTipDescription" 
    					  Command="Sample.SubGrid.campaign.FirstButton" 
    					  Sequence="10" 
    					  LabelText="$LocLabels:Sample.campaign.CustomTab.FirstGroup.FirstButton.LabelText" 
    					  Alt="$LocLabels:Sample.campaign.CustomTab.FirstGroup.FirstButton.LabelText"
    					  Image16by16="/_imgs/Ribbon/NewRecord_16.png" 
    					  Image32by32="/_imgs/Ribbon/NewRecord32.png" 
    					  TemplateAlias="o1" />					  
                        </Controls>
                      </Group>
                    </Groups>
                  </Tab>
                </CommandUIDefinition>
              </CustomAction>
    		</CustomActions>
            <Templates>
              <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
            </Templates>
            <CommandDefinitions >
    			<CommandDefinition Id="Sample.SubGrid.campaign.CustomTab">
                <EnableRules>
                  <EnableRule Id="Mscrm.Enabled " />
                </EnableRules>
                <DisplayRules />                          
                <Actions />
              </CommandDefinition>		  
    		  <CommandDefinition Id="Sample.SubGrid.campaign.FirstGroup">
                <EnableRules>
                  <EnableRule Id="Mscrm.Enabled " />
                </EnableRules>
                <DisplayRules />                          
                <Actions />
              </CommandDefinition>		  
    		  <CommandDefinition Id="Sample.SubGrid.campaign.FirstButton">
                <EnableRules>
                  <EnableRule Id="Mscrm.Enabled " />
                </EnableRules>
                <DisplayRules >	
    			</DisplayRules>
                <Actions >
    				<Url Address = "/main.aspx?etn=campaign&amp;pagetype=entityrecord" />				
    			</Actions >              			
              </CommandDefinition>
    		</CommandDefinitions >
            <RuleDefinitions>
              <TabDisplayRules>            
                <TabDisplayRule TabCommand="Sample.SubGrid.campaign.CustomTab">
                  <EntityRule EntityName="campaign" Context="SubGridStandard" />
                  <EntityRule EntityName="campaign" Context="SubGridAssociated" />
                </TabDisplayRule>
              </TabDisplayRules>
              <DisplayRules >
    			
    		  </DisplayRules>
              <EnableRules />
            </RuleDefinitions>
            <LocLabels>
    		  <LocLabel Id="Sample.campaign.CustomTab.Title">
                <Titles>
                  <Title languagecode="1033" description="Custom Tab" />
                </Titles>
              </LocLabel>
    		  <LocLabel Id="Sample.campaign.CustomTab.Description">
                <Titles>
                  <Title languagecode="1033" description="A custom tab for the campaign entity." />
                </Titles>
              </LocLabel>
    		  <LocLabel Id="Sample.campaign.CustomTab.FirstGroup.Title">
                <Titles>
                  <Title languagecode="1033" description="Record Group" />
                </Titles>
              </LocLabel>
    		  <LocLabel Id="Sample.campaign.CustomTab.FirstGroup.FirstButton.LabelText">
                <Titles>
                  <Title languagecode="1033" description="New Campaign" />
                </Titles>
              </LocLabel>
    		  <LocLabel Id="Sample.campaign.CustomTab.FirstGroup.FirstButton.ToolTipDescription">
                <Titles>
                  <Title languagecode="1033" description="Click here to create a new campaign." />
                </Titles>
              </LocLabel>
    		</LocLabels >
          </RibbonDiffXml>
        </Entity>
      </Entities>  
      <Languages>
        <Language>1033</Language>
      </Languages>
    </ImportExportXml>
    

     

    Expected Output:

    enjoy :)

     

    • Marked as answer by mehul512 Friday, September 16, 2011 6:08 AM
    Friday, September 16, 2011 6:08 AM