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



我正在尝试添加一个自定义按钮到自定义实体的"Main"-ribbon !我遵循了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'.

My 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>

我做错了什么?

亲切的问候,弗雷德里克

在这个例子中,Application功能区正在被编辑。Application Ribbon XML将对所有实体应用自定义。这就是为什么作者使用{!EntityLogicalName}而不是显式地命名实体。如果您只想将按钮添加到单个实体中,则需要在导出之前将实体而不是应用程序功能区添加到解决方案中。

这篇文章应该有帮助。

相关内容

最新更新