I'm trying to add a custom button to the "Main"-ribbon of a custom entity! I followed the example explained on http://mscrmshop.blogspot.com/2011/06/how-to-start-dialog-from-application_08.html... But i'm still getting the following error : The ribbon item 'Sample.ave_student.MainTab.MyURL.CustomAction' is dependent on ribbon control id='Mscrm.HomepageGrid.ave_student.MainTab.Workflow.Controls'.
My XML :
<ImportExportXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Entities></Entities>
<R开发者_如何学Coles></Roles>
<Workflows></Workflows>
<FieldSecurityProfiles></FieldSecurityProfiles>
<Templates />
<RibbonDiffXml>
<CustomActions>
<CustomAction Id="Sample.ave_student.MainTab.MyURL.CustomAction" Location="Mscrm.HomepageGrid.ave_student.MainTab.Workflow.Controls._children" Sequence="41">
<CommandUIDefinition>
<Button Id="Sample.ave_student.MainTab.MyURL.Button" Command="javascript.Command" LabelText="eID" ToolTipTitle="eID" ToolTipDescription="eID" TemplateAlias="o1" Image16by16="$webresource:ave_eid16x16" Image32by32="$webresource:ave_eid32x32" />
</CommandUIDefinition>
</CustomAction>
</CustomActions>
<Templates>
<RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
</Templates>
<CommandDefinitions>
<CommandDefinition Id="javascript.Command">
<EnableRules>
<EnableRule Id="Mscrm.Enabled"/>
</EnableRules>
<DisplayRules />
<Actions>
<JavaScriptFunction Library="$webresource:ave_eidlauncher" FunctionName="launcheid">
</JavaScriptFunction>
</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules />
<EnableRules />
</RuleDefinitions>
<LocLabels />
</RibbonDiffXml>
<EntityMaps />
<EntityRelationships />
<OrganizationSettings />
<optionsets />
<Languages>
<Language>1033</Language>
<Language>1036</Language>
</Languages>
</ImportExportXml>
What am I doing wrong?
Kind Regards, Frederic
The Application ribbon is being edited in the example. The Application Ribbon XML will apply the customizations to all entities. That is why the author used {!EntityLogicalName}
instead on explictly naming the entity. If you only want to add the button to a single entity you need to add the entity instead of the Application Ribbon to the solution before you export.
This article should help.
精彩评论