CRM 2011 - 应用程序功能区在导入时引发错误

时间:2011-07-06 16:04:23

标签: xml ribbon dynamics-crm-2011

我正在尝试将自定义按钮添加到自定义实体的“主要”组件中!我按照http://mscrmshop.blogspot.com/2011/06/how-to-start-dialog-from-application_08.html上解释的示例...但我仍然收到以下错误:功能区项'Sample.ave_student.MainTab.MyURL.CustomAction'依赖于功能区控件id ='Mscrm .HomepageGrid.ave_student.MainTab.Workflow.Controls'。

我的XML:

<ImportExportXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Entities></Entities>
  <Roles></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>

我做错了什么?

亲切的问候, 弗雷德里克

1 个答案:

答案 0 :(得分:4)

示例中正在编辑“应用程序”功能区。 Application Ribbon XML将自定义应用于所有实体。这就是作者使用{!EntityLogicalName}代替明确命名实体的原因。如果您只想将按钮添加到单个实体,则需要在导出之前将实体而不是应用程序功能区添加到解决方案中。

article应该会有所帮助。

相关问题