Dynaimc CRM查找字段自定义过滤视图
layoutXml = '<grid name="resultset" object="10057" jump="foton_sequenceno" select="1" icon="1" preview="1"><row name="result" id="foton_receiptid"><cell name="foton_sequenceno" width="150" /><cell name="createdon" width="150" /></row></grid>';
1 /**
2 * 选择产品代码后,根据产品资源与包装方式的关系过滤包装方式可选择的数据,添加自定义过滤视图
3 * @param {any} productFourthId 产品代码数据id
4 */
5 function addPostingLookupFilterCustomView(productFourthId) {
6 if (productFourthId == null) {
7 return
8 }
9 let fetchXml = '<fetch version="1.0" mapping="logical"><entity name="new_way_of_packaging"><attribute name="new_way_of_packagingid" /><attribute name="new_name" /><attribute name="new_cost" /><attribute name="createdon" /><link-entity name="new_product_packaging_relationship" from="new_way_of_packagingid" to="new_way_of_packagingid" alias="ship" link-type="inner"><filter type="and"><condition attribute="new_product_fourthid" operator="eq" value="' + commonUtil.delBrackets(productFourthId) + '" /></filter></link-entity></entity></fetch>';
10 let layoutXml = '<grid name="" object="10047" jump="new_name" select="1" icon="1" preview="0"><row name="new_way_of_packaging" id="new_way_of_packagingid"><cell name="new_name" width="300" /><cell name="new_cost" width="200" /><cell name="createdon" width="150" /></row></grid>';
11 Xrm.Page.getControl("new_way_of_packaging").addCustomView("{DB40ABE7-FB8D-4E41-ACF8-7569ECEAB149}", "new_way_of_packaging", "包装方式过滤产品资源查询", fetchXml, layoutXml, true);
12 }
1 //窗体onload函数汇总调用方法
2
3 /**
4 *过滤源、目标经销商来款可选视图
5 * @param {any} type 1转出账户 2转入账户
6 */
7 function preAccountToParagraphFilterLookup(type) {
8 if (!type) {
9 return
10 }
11 if (type == 1) {
12 Xrm.Page.getControl("new_lkaccount").addPreSearch(function () {
13 addPostingLookupFilterCustomView(type)
14 })
15 } else {
16 Xrm.Page.getControl("new_targetlkaccount").addPreSearch(function () {
17 addPostingLookupFilterCustomView(type)
18 })
19 }
20 }
21 /**
22 * 添加过滤源、目标经销商来款可选择的自定义视图
23 * @param {any} type 1转出账户 2转入账户
24 */
25 function addPostingLookupFilterCustomView(type) {
27 var fetchXml = '';
28 let amountId = null
29 if (type == 1) {
30 amountId = Xrm.Page.getAttribute("new_amountid_from").getValue()
31 amountId = amountId ? amountId[0].id : null
32 if (amountId == null) {
33 return
34 }
35 } else {
36 amountId = Xrm.Page.getAttribute("new_amountid_to").getValue()
37 amountId = amountId ? amountId[0].id : null
38 if (amountId == null) {
39 return
40 }
41 }
42 fetchXml = '<fetch version="1.0" mapping="logical"><entity name="new_lkaccount"><attribute name="new_lkaccountid" /><attribute name="new_name" /><attribute name="createdon" /><filter type="and"><condition attribute="new_approvalstatus" operator="eq" value="40" /><filter type="or"><condition attribute="new_amountid_capital" operator="eq" value="' + commonUtil.delBrackets(amountId) + '" /><condition attribute="new_amountid_parts" operator="eq" value="' + commonUtil.delBrackets(amountId) + '" /></filter></filter></entity></fetch>';
43 var layoutXml = '<grid name="" object="10174" jump="new_name" select="1" icon="1" preview="0"><row name="new_lkaccount" id="new_lkaccountid"><cell name="new_name" width="300" /><cell name="createdon" width="150" /></row></grid>';
44
45 if (type == 1) {
46 Xrm.Page.getControl("new_lkaccount").addCustomView("{4F08B504-491C-473F-B215-FF99894870D9}", "new_lkaccount", "经销商来款过滤资金账户查询", fetchXml, layoutXml, true);
47 } else {
48 Xrm.Page.getControl("new_targetlkaccount").addCustomView("{4F08B504-491C-473F-B215-FF99894870D9}", "new_lkaccount", "经销商来款过滤资金账户查询", fetchXml, layoutXml, true);
49 }
50 }
Dynaimc CRM查找字段自定义过滤视图的更多相关文章
- Dynamics CRM 查找字段下拉的最多10个选项的排序规则
原文链接来自DTCCh论坛http://dynamics.ms-talent.com.cn/bbs/content/?id=1406&catogory=CRM 如果你是从事dynamics c ...
- Office365学习笔记—Xslt自定义列表视图
1,在Office365中需要添加自定义的视图!用Spd添加视图,这儿我添加一个testView! (1)打开testView.aspx将</ZoneTemplate>节点中的内容全部删除 ...
- 查找字段的筛选-使用addCustomView
关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复231或者20161031可方便获取本文,同时可以在第一间得到我发布的最新的博文信息,follow me!我的网站是 www.luoyong. ...
- MS CRM 2011的自定义和开发(11)——插件(plugin)开发(二)
http://www.cnblogs.com/StoneGarden/archive/2012/02/06/2339490.html MS CRM 2011的自定义和开发(11)——插件(plugin ...
- 自定义View视图
自定义View视图文件查找逻辑 之前MVC5和之前的版本中,我们要想对View文件的路径进行控制的话,则必须要对IViewEngine接口的FindPartialView或FindView方法进行重写 ...
- openEntityForm时候如何给关于(regardingobjectid)类型查找字段赋值?
本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复264或者20170924可方便获取本文,同时可以在第一间得到我发布的最新的博文信息,follow me!我的网站是 www.luoyong.me ...
- Dynamics 365中使用Web API将查找字段的值设置为空值的方法。
摘要: 本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复270或者20180424可方便获取本文,同时可以在第一间得到我发布的最新的博文信息,follow me!我的网站是 www.luoyon ...
- Dynamics CRM2016 Web Api之查询查找字段的相关属性
之前有篇博文介绍了如何获取查找字段的name值(跳转),本篇在此基础上再延伸下,实现的效果类似于EntityReference,可以取到查找字段的id,name,localname. 这里我以客户实体 ...
- openEntityForm如何给关于(regardingobjectid)类型查找字段赋值?
本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复264或者20170924可方便获取本文,同时可以在第一间得到我发布的最新的博文信息,follow me!我的网站是 www.luoyong.me ...
- List多个字段标识过滤 IIS发布.net core mvc web站点 ASP.NET Core 实战:构建带有版本控制的 API 接口 ASP.NET Core 实战:使用 ASP.NET Core Web API 和 Vue.js 搭建前后端分离项目 Using AutoFac
List多个字段标识过滤 class Program{ public static void Main(string[] args) { List<T> list = new List& ...
随机推荐
- npm安装html2canvas依赖报错 npm ERR! Unexpected token < in JSON at position 0 while parsing near '<!DOCTYPE html> npm ERR! <htm...'
今天安装某个依赖时发现npm ERR! 可我是正常操作啊,也没有升级啥的,咋就安装不了了? npm install --save html2canvas 报错信息如下: npm ERR! Unexpe ...
- esp8266+MQTT+DHT11(温湿度计) platformio
esp8266 + MQTT + DHT11(温湿度计) 连线 #include <Arduino.h> #include <ESP8266WiFi.h> #include & ...
- Python 潮流周刊#75:用 Python 开发 NoSQL 数据库(摘要)
本周刊由 Python猫 出品,精心筛选国内外的 250+ 信息源,为你挑选最值得分享的文章.教程.开源项目.软件工具.播客和视频.热门话题等内容.愿景:帮助所有读者精进 Python 技术,并增长职 ...
- 14.Kubernetes核心技术Helm
Kubernetes核心技术Helm Helm就是一个包管理工具[类似于npm] 为什么引入Helm 首先在原来项目中都是基于yaml文件来进行部署发布的,而目前项目大部分微服务化或者模块化,会分成很 ...
- Myeclipse优化:自动转义字符串中的特殊字符
在Myeclipse或者Eclipse中,将一段带引号(或其他的需要转义)字符串黏贴到引号中,双引号默认不会自动转义,手工一个一个去转义(变成\")的话实在是费事,这里记录一下让Myecli ...
- JAVA并发编程学习笔记之synchronized
监视器 java中同步是通过监视器模型来实现的,JAVA中的监视器实际是一个代码块,这段代码块同一时刻只允许被一个线程执行.线程要想执行这段代码块的唯一方式是获得监视器. 监视器有两种同步方式:互斥与 ...
- 静态分析工具及使用总结(二)CheckStyle
这里主要介绍三种开源的工具,PMD.CheckStyle和FindBugs,着重是在Ant里的调用,据说商业软件JTest也是著名的代码分析工具,哈哈,要花钱的没有用过. Checkstyle (ht ...
- Elasticsearch之常见问题
一. 聚合操作时,报Fielddata is disabled on text fields by default GET /megacorp/employee/_search { "agg ...
- 使用LOGSTASH 将数据导入到ES
logstash 执行过程 input -->filter -->output filter 可以对数据进行处理 输出插件 codec plugin 使用脚本将数据导入到ES input ...
- Uri的解析
//最基本的划分 [scheme:]scheme-specific-part[#fragment] //对scheme-specific-part进一步划分 [scheme:][//authority ...