您似乎在谈论的 CRM 解决方案是这样的
http://www.wave-access.com/Public_en/ms_crm_gamification_product.aspx
这显然是不支持的。然而,他们通过在功能区中添加一个虚拟按钮来实现它,特别是珠宝菜单。此按钮命令链接到 web 资源中的 JS 函数。该按钮始终隐藏,但始终加载 JS 文件。
应该注意的是,您的 JS 被加载到 Main.aspx(根文档)中,从那里将 HTML 元素或 javascript 注入所需的框架。(导航或内容)
这是要添加到解决方案的 RibbonDiffXML。
<RibbonDiffXml>
<CustomActions>
  <CustomAction Id="Dummy.CustomAction" Location="Mscrm.Jewel.Controls1._children" Sequence="41">
    <CommandUIDefinition>
      <Button Id="Dummy" Command="Dummy.Command" Sequence="50" ToolTipTitle="$LocLabels:Dummy.LabelText" LabelText="$LocLabels:Dummy.LabelText" ToolTipDescription="$LocLabels:Dummy.Description" TemplateAlias="isv" />
    </CommandUIDefinition>
  </CustomAction>
</CustomActions>
<Templates>
  <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
</Templates>
<CommandDefinitions>
  <CommandDefinition Id="Dummy.Command">
    <EnableRules />
    <DisplayRules>
      <DisplayRule Id="Dummy.Command.DisplayRule.PageRule" />
    </DisplayRules>
    <Actions>
      <JavaScriptFunction Library="$webresource:MyGlobal.js" FunctionName="Anything" />
    </Actions>
  </CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
  <TabDisplayRules />
  <DisplayRules>
    <DisplayRule Id="Dummy.Command.DisplayRule.PageRule">
      <PageRule Address="aaaa" />
    </DisplayRule>
  </DisplayRules>
  <EnableRules />
</RuleDefinitions>
<LocLabels>
  <LocLabel Id="Dummy.Description">
    <Titles>
      <Title languagecode="1033" description="Description" />
    </Titles>
  </LocLabel>
  <LocLabel Id="Dummy.LabelText">
    <Titles>
      <Title languagecode="1033" description="Description" />
    </Titles>
  </LocLabel>
</LocLabels>
这在 customs.xml 的根 ImportExportXml 元素中您可能还需要通过 UI 添加应用程序功能区作为解决方案组件