Dynamics crm 将按钮添加到帐户实体主页';s功能区/命令栏
玩功能区时,我尝试在帐户实体主页的功能区/命令栏上添加一个按钮,就在+新建按钮之前。但它并没有显示在页面的任何地方。我错过了什么 这是我在阅读SDK后编写的示例XMLDynamics crm 将按钮添加到帐户实体主页';s功能区/命令栏,dynamics-crm,dynamics-crm-2013,Dynamics Crm,Dynamics Crm 2013,玩功能区时,我尝试在帐户实体主页的功能区/命令栏上添加一个按钮,就在+新建按钮之前。但它并没有显示在页面的任何地方。我错过了什么 这是我在阅读SDK后编写的示例XML <RibbonDiffXml> <CustomActions> <CustomAction Id="Bee.CustomAction.GoToUrl" Location="Mscrm.HomepageGrid.accoun
<RibbonDiffXml>
<CustomActions>
<CustomAction Id="Bee.CustomAction.GoToUrl" Location="Mscrm.HomepageGrid.account.MainTab.Management.Controls._children">
<CommandUIDefinition>
<Button Id="Bee.HomepageGrid.account.GoToUrl" Command="Bee.CommandDefinition.GoToUrl" LabelText="Go To URL" ToolTipDescription="Description, Go to URL with selected account" ToolTipTitle="Title, Go to URL with selected account" />
</CommandUIDefinition>
</CustomAction>
</CustomActions>
<Templates>
<RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
</Templates>
<CommandDefinitions>
<CommandDefinition Id="Bee.CommandDefinition.GoToUrl">
<EnableRules>
<EnableRule Id="Bee.EnableRule.SelectionCountOne" />
</EnableRules>
<DisplayRules>
<DisplayRule Id="Bee.DisplayRule.AllClients"/>
</DisplayRules>
<Actions>
<Url Address="http://localhost/mysite" PassParams="true"></Url>
</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules>
<DisplayRule Id="Bee.DisplayRule.AllClients">
<CommandClientTypeRule Type="Modern" />
<CommandClientTypeRule Type="Refresh" />
<CommandClientTypeRule Type="Legacy" />
</DisplayRule>
</DisplayRules>
<EnableRules>
<EnableRule Id="Bee.EnableRule.SelectionCountOne">
<SelectionCountRule Minimum="1" Maximum="1" AppliesTo="SelectedEntity" />
</EnableRule>
</EnableRules>
</RuleDefinitions>
<LocLabels />
</RibbonDiffXml>
我建议您试试。您不再需要下载/提取/修改/打包/导入。一切都是直接从Dynamics CRM完成的,不需要任何XML知识。您应该向RibbonDiffXml添加LocLabels。属性LabelText a.o.必须包含对这些本地化标签的引用。它们不是用来保存文本本身的
在CodePlex上查找一些优秀的功能区编辑器;他们会给你一个好的开始 我只需应用一个
CommandClientTypeRule
Type=“Refresh”,就可以了。再次应用所有三种不工作的类型。它们都有如下不同的含义
现代版:使用Microsoft Dynamics CRM for Tablet显示命令栏
刷新:使用更新的用户界面显示命令栏
旧版:功能区以未更新实体的形式显示,或以Microsoft Dynamics CRM for Microsoft Office Outlook的列表视图显示
<DisplayRules>
<DisplayRule Id="Bee.DisplayRule.AllClients">
<CommandClientTypeRule Type="Refresh" />
</DisplayRule>
</DisplayRules>
但是转到url按钮转到下拉隐藏菜单中的溢出部分
在命令栏上的按钮显示在NEW按钮之前应用一些顺序,下面是RibbonXml,当选择一条记录时,它会在NEW按钮之前显示按钮
<RibbonDiffXml>
<CustomActions>
<CustomAction Id="Bee.CustomAction.GoToUrl" Location="Mscrm.HomepageGrid.account.MainTab.Management.Controls._children" Sequence="5">
<CommandUIDefinition>
<Button Id="Bee.HomepageGrid.account.GoToUrl"
LabelText="Go To URL"
ToolTipDescription="Description, Go to URL with selected account"
ToolTipTitle="Title, Go to URL with selected account"
Alt="Go to"
Command="Bee.CommandDefinition.GoToUrl"
Sequence="5"
TemplateAlias="o1" />
</CommandUIDefinition>
</CustomAction>
</CustomActions>
<Templates>
<RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
</Templates>
<CommandDefinitions>
<CommandDefinition Id="Bee.CommandDefinition.GoToUrl">
<EnableRules>
<EnableRule Id="Bee.EnableRule.SelectionCountOne" />
</EnableRules>
<DisplayRules>
<DisplayRule Id="Bee.DisplayRule.AllClients"/>
</DisplayRules>
<Actions>
<Url Address="http://localhost/mysite" PassParams="true"></Url>
</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules>
<DisplayRule Id="Bee.DisplayRule.AllClients">
<CommandClientTypeRule Type="Refresh" />
</DisplayRule>
</DisplayRules>
<EnableRules>
<EnableRule Id="Bee.EnableRule.SelectionCountOne">
<SelectionCountRule Minimum="1" Maximum="1" AppliesTo="SelectedEntity" />
</EnableRule>
</EnableRules>
</RuleDefinitions>
<LocLabels/>
</RibbonDiffXml>
你是对的。默认情况下,DisplayRule中的多个规则类型由AND运算符绑定。这就是为什么这条规则没有被证实是正确的。要通过OR运算符绑定规则类型,我们必须将它们封装在中。顺便说一下,要在任何类型的客户端中显示按钮,我们根本不需要添加任何显示规则。不,这不是问题。《实施指南》指出,“尽管显示文本的功能区元素允许直接输入文本,但使用本地化标签定义功能区中显示的文本是最佳做法”。这有助于开始和理解功能区自定义。但我还是喜欢自己编写代码。它给你更多的幕后洞察。