【问题标题】:Change the "New" button Quote subgrid更改“新建”按钮引用子网格
【发布时间】:2014-01-13 15:13:16
【问题描述】:

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

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

这是引用的 XML。使用 Ribbon Workbench 生成:

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

有什么想法吗?

【问题讨论】:

    标签: dynamics-crm dynamics-crm-2013


    【解决方案1】:

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

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

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

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多