Dynamics CRM通过定制应用程序功能区为符合条件的实体表单增加按钮

<ImportExportXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Entities></Entities>
<Roles></Roles>
<Workflows></Workflows>
<FieldSecurityProfiles></FieldSecurityProfiles>
<Templates />
<RibbonDiffXml>
<CustomActions />
<Templates>
<RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
</Templates>
<CommandDefinitions />
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules />
<EnableRules />
</RuleDefinitions>
<LocLabels />
</RibbonDiffXml>
<EntityMaps />
<EntityRelationships />
<OrganizationSettings />
<optionsets />
<Languages>
<Language>2052</Language>
<Language>1033</Language>
</Languages>
</ImportExportXml>
<LocLabels>
<LocLabel Id="LuoYong.Common.LikeIt.LabelText">
<Titles>
<Title languagecode="2052" description="点赞" />
<Title languagecode="1033" description="Like it"/>
</Titles>
</LocLabel>
<LocLabel Id="LuoYong.Common.LikeIt.ToolTip">
<Titles>
<Title languagecode="2052" description="喜欢就点赞吧!"/>
<Title languagecode="1033" description="I like it!" />
</Titles>
</LocLabel>
</LocLabels>
</RibbonDiffXml>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules>
<DisplayRule Id="LuoYong.Common.DisplayRules.EntityPropertyHasNotes">
<EntityPropertyRule AppliesTo="PrimaryEntity" PropertyName="HasNotes" PropertyValue="true"/>
</DisplayRule>
</DisplayRules>
<EnableRules>
<EnableRule Id="LuoYong.Common.EnableRules.FormStateExisting">
<FormStateRule State="Existing"/>
</EnableRule>
</EnableRules>
</RuleDefinitions>
<CommandDefinitions>
<CommandDefinition Id="Mscrm.Form.{!EntityLogicalName}.MainTab.Save.LikeIt.Command">
<EnableRules>
<EnableRule Id="LuoYong.Common.EnableRules.FormStateExisting"/>
</EnableRules>
<DisplayRules>
<DisplayRule Id="LuoYong.Common.DisplayRules.EntityPropertyHasNotes"/>
</DisplayRules>
<Actions>
<JavaScriptFunction FunctionName="LikeIt" Library="$webresource:new_/common/js/RibbonScript.js">
<CrmParameter Value="PrimaryEntityTypeName" />
<CrmParameter Value="FirstPrimaryItemId" />
</JavaScriptFunction>
</Actions>
</CommandDefinition>
</CommandDefinitions>
<CustomAction Id="Mscrm.Form.{!EntityLogicalName}.MainTab.Save.LikeIt.CustomAction" Location="Mscrm.Form.{!EntityLogicalName}.MainTab.Save.Controls._children" Sequence="10">
<CommandUIDefinition>
<Button Id="Mscrm.Form.{!EntityLogicalName}.MainTab.Save.LikeIt" Command="Mscrm.Form.{!EntityLogicalName}.MainTab.Save.LikeIt.Command" Sequence="48" LabelText="$LocLabels:LuoYong.Common.LikeIt.LabelText" ToolTipTitle="$LocLabels:LuoYong.Common.LikeIt.ToolTip" Image16by16="/_imgs/ribbon/Entity16_8006.png" Image32by32="/_imgs/ribbon/Entity32_8006.png" />
</CommandUIDefinition>
</CustomAction>
<RibbonDiffXml>
<CustomActions>
<CustomAction Id="Mscrm.Form.{!EntityLogicalName}.MainTab.Save.LikeIt.CustomAction" Location="Mscrm.Form.{!EntityLogicalName}.MainTab.Save.Controls._children" Sequence="10">
<CommandUIDefinition>
<Button Id="Mscrm.Form.{!EntityLogicalName}.MainTab.Save.LikeIt" Command="Mscrm.Form.{!EntityLogicalName}.MainTab.Save.LikeIt.Command" Sequence="48" LabelText="$LocLabels:LuoYong.Common.LikeIt.LabelText" ToolTipTitle="$LocLabels:LuoYong.Common.LikeIt.ToolTip" Image16by16="/_imgs/ribbon/Entity16_8006.png" Image32by32="/_imgs/ribbon/Entity32_8006.png" />
</CommandUIDefinition>
</CustomAction>
</CustomActions>
<Templates>
<RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
</Templates>
<CommandDefinitions>
<CommandDefinition Id="Mscrm.Form.{!EntityLogicalName}.MainTab.Save.LikeIt.Command">
<EnableRules>
<EnableRule Id="LuoYong.Common.EnableRules.FormStateExisting"/>
</EnableRules>
<DisplayRules>
<DisplayRule Id="LuoYong.Common.DisplayRules.EntityPropertyHasNotes"/>
</DisplayRules>
<Actions>
<JavaScriptFunction FunctionName="LikeIt" Library="$webresource:new_/common/js/RibbonScript.js">
<CrmParameter Value="PrimaryEntityTypeName" />
<CrmParameter Value="FirstPrimaryItemId" />
</JavaScriptFunction>
</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules>
<DisplayRule Id="LuoYong.Common.DisplayRules.EntityPropertyHasNotes">
<EntityPropertyRule AppliesTo="PrimaryEntity" PropertyName="HasNotes" PropertyValue="true"/>
</DisplayRule>
</DisplayRules>
<EnableRules>
<EnableRule Id="LuoYong.Common.EnableRules.FormStateExisting">
<FormStateRule State="Existing"/>
</EnableRule>
</EnableRules>
</RuleDefinitions>
<LocLabels>
<LocLabel Id="LuoYong.Common.LikeIt.LabelText">
<Titles>
<Title languagecode="2052" description="点赞" />
<Title languagecode="1033" description="Like it"/>
</Titles>
</LocLabel>
<LocLabel Id="LuoYong.Common.LikeIt.ToolTip">
<Titles>
<Title languagecode="2052" description="喜欢就点赞吧!"/>
<Title languagecode="1033" description="I like it!" />
</Titles>
</LocLabel>
</LocLabels>
</RibbonDiffXml>
function LikeIt(EntityName, EntityId) {
Xrm.Utility.alertDialog("感谢用户 " + Xrm.Page.context.getUserName() + " 对实体逻辑名称为" + EntityName + ",Id为" + EntityId + ",主要属性值为" + Xrm.Page.data.entity.getPrimaryAttributeValue() + "的记录点赞!");
}

去自定义的一个启用了注释的测试实体看看,也有:

但是我如果去一个我没有启用注释功能的实体看看,则是没有这个按钮的,当然新建记录时候也是没有的。

Dynamics CRM通过定制应用程序功能区为符合条件的实体表单增加按钮的更多相关文章
- Dynamics CRM 依赖组件类型为应用程序功能区导致的无法删除实体问题的解决方法
看到有人问到这个问题,这边就简单描述下解决方法,主要是针对第一次碰到这个问题云里雾里的朋友,错误如下 在我们建lookup关联的时候有下图中的这么个设置,对于很多新手默认就是下图这样不会去做改动,因为 ...
- Dynamics CRM命令栏定制基础知识及手动编辑customization.xml实例
关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复166或者20151028可方便获取本文,同时可以在第一时间得到我发布的最新的博文信息,follow me! 前面的博文:Dynamics C ...
- Dynamics CRM 客户端程序开发:在实体的列表界面添加按钮
关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复114或者20140312可方便获取本文,同时可以在第一时间得到我发布的最新的博文信息,follow me! 如果没有安装Ribbon Wor ...
- Dynamics CRM定制子网格添加按钮实例之一
关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复221或者20160430可方便获取本文,同时可以在第一间得到我发布的最新的博文信息,follow me!我的网站是 www.luoyong. ...
- 控制台程序(C#)不弹出认证窗口连接到Dynamics CRM Online的Web API
摘要: 本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复271或者20180602可方便获取本文,同时可以在第一间得到我发布的最新的博文信息,follow me!我的网站是 www.luoyon ...
- Microsoft Dynamics CRM4.0 JScript 过滤lookup 出现 Microsoft Dynamics CRM 窗口无法打开,可能已被弹出窗口阻止程序所阻止。
一.现象:JScript过滤lookup字段,选择lookup字段出现下图的情况: 出现:Microsoft Dynamics CRM 窗口无法打开,可能已被弹出窗口阻止程序所阻止.请将这台Micro ...
- 定制Dynamics CRM标准导出功能:不能导出指定列的值
关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复239或者20161203可方便获取本文,同时可以在第一间得到我发布的最新的博文信息,follow me!我的网站是 www.luoyong. ...
- 控制台程序(C#)不弹出登录窗口连接到Dynamics CRM Online的Web API
微软动态CRM专家罗勇 ,回复331或者20190505可方便获取本文,同时可以在第一间得到我发布的最新博文信息,follow me! 我之前的文章 控制台程序(C#)不弹出认证窗口连接到Dynami ...
- Dynamics CRM - 解决无法使用 Ribbon Workbench 2016 定制 Sub-Grid View Button 的问题(SubGrid MainTab 消失之谜)
发现问题: 在 Dynamics CRM 开发中,会经常使用 Ribbon Workbench 工具来定制 Button 或者对已有 Button 进行自定义功能开发,比如隐藏 SubGrid 的 A ...
随机推荐
- redis数据类型--set
set是String的一个无序集合,最大存储量2^32-1(大概40多亿) 1.操作命令:(xxx可以是任意字符串) sadd xxx a b c d e (添加一个或多个) smembers xxx ...
- 《手把手教你》系列进阶篇之3-python+ selenium自动化测试 - python几种骚操作你都知道吗?(详细教程)
1. 简介 这篇文章主要是给小伙伴或者童鞋们介绍和分享 python几种骚操:读取配置文件.获取根目录的相对路径.获取系统时间和格式化时间显示.字符串切割等等操作.为后边的自动化框架打下一个结实的基础 ...
- mac终端基本命令
一 基本命令 1.列出文件 ls 参数 目录名 参数 -w 显示中文,-l 详细信息, -a 包括隐藏文件 例: 看看驱动目录下有什么:ls /System/Library/Extensions 2. ...
- ARTS-S golang定义类
package main import "fmt" type Student struct { Num int64 Name string } func(s *Student) s ...
- Python3 并发编程2
目录 进程互斥锁 基本概念 互斥锁的使用 IPC 基本概念 队列 生产者消费者模型 基本概念 代码实现 线程 基本概念 创建线程 线程互斥锁 进程互斥锁 基本概念 临界资源: 一次仅允许一个进程使用的 ...
- 【H5】344- 微信 H5 页面兼容性解决方案
点击上方"前端自习课"关注,学习起来~ 最近给公司微信公众号,写了微信h5业务页面,总结分享一下前端开发过程中的几个兼容性坑,项目直接拿的公司页面,所以下文涉及图片都模糊处理了. ...
- 【算法】272-每周一练 之 数据结构与算法(Dictionary 和 HashTable)
这是第五周的练习题,上周忘记发啦,这周是复习 Dictionary 和 HashTable. 下面是之前分享的链接: [算法]200-每周一练 之 数据结构与算法(Stack) [算法]213-每周一 ...
- 深入探索Java设计模式(二)之策略模式
策略设计模式是Java API库中常见的模式之一.这与另一个设计模式(称为状态设计模式)非常相似.本文是在学习完优锐课JAVA架构VIP课程—[框架源码专题]中<学习源码中的优秀设计模式> ...
- 解决问题的能力 > 10倍程序员
如果第二次看到我的文章,欢迎右侧扫码订阅我哟~
- Java 从入门到进阶之路(十四)
在之前的文章我们介绍了一下 Java 中的抽象类和抽象方法,本章我们来看一下 Java 中的接口. 在日常生活中,我们会接触到很多类似接口的问题,比如 USB 接口,我们在电脑上插鼠标,键盘,U盘的时 ...