1

我在铅带中有自定义按钮。当潜在客户合格时,应隐藏自定义按钮。我怎样才能做到这一点?任何人都可以解释一下。我很感激。

4

1 回答 1

2

您实际上可以使用内置DisplayRule功能完全完成此操作。当 aLead符合条件时,该StatusCode属性设置为“Qualified”,即OptionSet值“3”。您可以在 a 中检查此属性的值ValueRule并适当地显示/隐藏控件。我可以想到两种方法来实现这一点:

Erik Pool 的可视化功能区编辑器 带领

功能区Xml

<RibbonDiffXml>
  <CustomActions>
    <CustomAction Id="CompanyName.Form.lead.MainTab.Actions.Sample.CustomAction" Location="Mscrm.Form.lead.MainTab.Actions.Controls._children" Sequence="41">
      <CommandUIDefinition>
        <Button Id="CompanyName.Form.lead.MainTab.Actions.Sample" Command="CompanyName.Form.lead.MainTab.Actions.Sample.Command" Sequence="29" ToolTipTitle="$LocLabels:CompanyName.Form.lead.MainTab.Actions.Sample.LabelText" LabelText="$LocLabels:CompanyName.Form.lead.MainTab.Actions.Sample.LabelText" ToolTipDescription="$LocLabels:CompanyName.Form.lead.MainTab.Actions.Sample.Description" TemplateAlias="isv" />
      </CommandUIDefinition>
    </CustomAction>
  </CustomActions>
  <Templates>
    <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
  </Templates>
  <CommandDefinitions>
    <CommandDefinition Id="CompanyName.Form.lead.MainTab.Actions.Sample.Command">
      <EnableRules />
      <DisplayRules>
        <DisplayRule Id="CompanyName.Form.lead.MainTab.Actions.Sample.Command.DisplayRule.ValueRule" />
      </DisplayRules>
      <Actions>
        <Url Address="http://www.bing.com" />
      </Actions>
    </CommandDefinition>
  </CommandDefinitions>
  <RuleDefinitions>
    <TabDisplayRules />
    <DisplayRules>
      <DisplayRule Id="CompanyName.Form.lead.MainTab.Actions.Sample.Command.DisplayRule.ValueRule">
        <ValueRule Field="statuscode" Value="3" />
      </DisplayRule>
    </DisplayRules>
    <EnableRules />
  </RuleDefinitions>
  <LocLabels>
    <LocLabel Id="CompanyName.Form.lead.MainTab.Actions.Sample.LabelText">
      <Titles>
        <Title languagecode="1033" description="Sample" />
      </Titles>
    </LocLabel>
    <LocLabel Id="CompanyName.Form.lead.MainTab.Actions.Sample.Description">
      <Titles>
        <Title languagecode="1033" description="Sample Description" />
      </Titles>
    </LocLabel>
  </LocLabels>
</RibbonDiffXml>
于 2012-07-25T15:28:33.277 回答