Измените вложенную сетку Quote кнопки New

Форма продажи в виде подсетки котировок. Я пытаюсь скрыть существующую кнопку «Создать» и создать собственную. Скрытие существующей кнопки работает как шарм. Однако ничего из того, что я делаю, не вызывает появление пользовательской кнопки.

Я попытался сделать условия включения и видимости такими же простыми, как простая проверка того, что форма предназначена для существующей сущности. Кажется, ничего не работает.

Вот 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>

Любые идеи?


person LameCoder    schedule 13.01.2014    source источник


Ответы (1)


Это CRM2011 или CRM2013? Если это CRM2013, вы не можете добавить новую кнопку в подсетки формы — только в полное представление связанной подсетки.

Кнопки видны по умолчанию, поэтому вам не нужны какие-либо специальные правила отображения/включения.

Надеюсь, это поможет, Скотт

person Scott Durow    schedule 13.01.2014