1

作为报价子网格的机会形式。我正在尝试隐藏现有的“新建”按钮并创建一个自定义按钮。隐藏现有按钮就像一个魅力。但是,我所做的一切似乎都没有使自定义按钮出现。

我尝试使启用和可见性条件变得简单,就像检查表单是否适用于现有实体一样简单。似乎没有任何效果。

这是报价的 XML。使用功能区工作台生成:

<RibbonDiffXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <CustomActions>
    <CustomAction Id="ntcp.quote.Button1.Button.CustomAction" Location="Mscrm.SubGrid.quote.MainTab.Management.Controls._children" Sequence="17">
      <CommandUIDefinition>
        <Button Alt="$LocLabels:ntcp.quote.Button1.Button.Alt" Command="ntcp.quote.Command0.Command" Description="" Id="ntcp.quote.Button1.Button" Image32by32="/_imgs/ribbon/newrecord32.png" Image16by16="/_imgs/ribbon/New_16.png" LabelText="$LocLabels:ntcp.quote.Button1.Button.LabelText" Sequence="17" TemplateAlias="o1" ToolTipTitle="$LocLabels:ntcp.quote.Button1.Button.ToolTipTitle" ToolTipDescription="$LocLabels:ntcp.quote.Button1.Button.ToolTipDescription" ModernImage="New" />
      </CommandUIDefinition>
    </CustomAction>
    <HideCustomAction HideActionId="ntcp.Mscrm.SubGrid.quote.AddNewStandard.Hide" Location="Mscrm.SubGrid.quote.AddNewStandard" />
  </CustomActions>
  <Templates>
    <RibbonTemplates Id="Mscrm.Templates" />
  </Templates>
  <CommandDefinitions>
    <CommandDefinition Id="ntcp.quote.Command0.Command">
      <EnableRules>
        <EnableRule Id="ntcp.quote.EnableRule0.EnableRule" />
      </EnableRules>
      <DisplayRules>
        <DisplayRule Id="ntcp.quote.DisplayRule0.DisplayRule" />
      </DisplayRules>
      <Actions>
        <JavaScriptFunction FunctionName="ntcp_QuoteFromOpportunity" Library="$webresource:ntcp_/quoteFromOpportunity.js" />
      </Actions>
    </CommandDefinition>
  </CommandDefinitions>
  <RuleDefinitions>
    <TabDisplayRules />
    <DisplayRules>
      <DisplayRule Id="ntcp.quote.DisplayRule0.DisplayRule">
        <FormStateRule State="Existing" Default="true" />
      </DisplayRule>
    </DisplayRules>
    <EnableRules>
      <EnableRule Id="ntcp.quote.EnableRule0.EnableRule">
        <FormStateRule State="Existing" Default="true" />
      </EnableRule>
    </EnableRules>
  </RuleDefinitions>
  <LocLabels>
    <LocLabel Id="ntcp.quote.Button1.Button.LabelText">
      <Titles>
        <Title description="Add New Quote" languagecode="1033" />
      </Titles>
    </LocLabel>
    <LocLabel Id="ntcp.quote.Button1.Button.ToolTipTitle">
      <Titles>
        <Title description="Add New Quote" languagecode="1033" />
      </Titles>
    </LocLabel>
    <LocLabel Id="ntcp.quote.Button1.Button.ToolTipDescription">
      <Titles>
        <Title description="Add New Quote" languagecode="1033" />
      </Titles>
    </LocLabel>
    <LocLabel Id="ntcp.quote.Button1.Button.Alt">
      <Titles>
        <Title description="Add New Quote" languagecode="1033" />
      </Titles>
    </LocLabel>
  </LocLabels>
</RibbonDiffXml>

有任何想法吗?

4

1 回答 1

2

这是 CRM2011 还是 CRM2013?如果是 CRM2013,您不能在表单子网格上添加新按钮 - 只能在完整相关的子网格视图上。

默认情况下按钮是可见的,因此您不需要任何特殊的显示/启用规则。

希望这会有所帮助,斯科特

于 2014-01-13T15:50:32.923 回答