当前位置:网站首页>Dynamics 365 查找字段过滤
Dynamics 365 查找字段过滤
2022-07-07 21:50:00 【zcy_wxy】
以systemuser为例
addFilterToDisputeControl: function (groupAttrName, ownerAttrName) {
var viewDisplayName = groupAttrName;
var lookupControl = Xrm.Page.getControl(ownerAttrName);
var layoutXml = "<grid name='resultset' object='10013' jump='fullname' select='1' icon='1' preview='1'><row name='result' id='systemuserid'><cell name='fullname' width='300' /><cell name='businessunitid' width='300' /><cell name='scc_leadcount' width='300' /></row></grid>";
var id = leadForm.guid();
var entityName = "systemuser";
var filter = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>"
+ " <entity name='systemuser'>"
+ "<attribute name='systemuserid' />"
+ "<attribute name='fullname' />"
+ "<attribute name='businessunitid' />"
+ "<attribute name='scc_leadcount' />"
+" <filter type='and'>"
+" <condition attribute='scc_businessgroupid' operator='eq' uitype='scc_businessgroup' value='{0}' />"
+" </filter>"
+" <link-entity name='systemuserroles' from='systemuserid' to='systemuserid' visible='false' intersect='true'>"
+" <link-entity name='role' from='roleid' to='roleid' alias='ab'>"
+" <filter type='and'>"
+" <condition attribute='name' operator='eq' value='AR' />"
+" </filter>"
+" </link-entity>"
+" </link-entity>"
+" </entity>"
+"</fetch>";
var group = Xrm.Page.getAttribute(groupAttrName).getValue();
if (group) {
filter = filter.replace("{0}", group[0].id);
lookupControl.addCustomView(id, entityName, viewDisplayName, filter, layoutXml, false);
lookupControl.setDefaultView(id);
}
},
guid: function(){
function S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
}
注意点:
1、entity中配置的attribute要包含grid中配置的属性名称
2、视图名称最好不同,视图ID则必须不同。
代码中视图ID的生成引用自
边栏推荐
- oc 可变參数传递
- Cascade-LSTM: A Tree-Structured Neural Classifier for Detecting Misinformation Cascades-KDD2020
- iNFTnews | Web5 vs Web3:未来是一个过程,而不是目的地
- 每日一题——PAT乙级1002题
- Use JfreeChart to generate curves, histograms, pie charts, and distribution charts and display them to jsp-2
- ArcGIS:矢量要素相同字段属性融合的两种方法
- Txt file virus
- 2021-01-11
- 小程序多种开发方式对比-跨端?低代码?原生?还是云开发?
- Leetcode19. Delete the penultimate node of the linked list [double pointer]
猜你喜欢
Gbu1510-asemi power supply special 15A rectifier bridge gbu1510
What is fake sharing after filling the previous hole?
LeetCode142. Circular linked list II [two pointers, two methods for judging links in the linked list and finding ring points]
微生物健康网,如何恢复微生物群落
Interview questions: how to test app performance?
安踏DTC | 安踏转型,构建不只有FILA的增长飞轮
Line measurement - graphic reasoning -9- line problem class
微生物健康網,如何恢複微生物群落
iNFTnews | Web5 vs Web3:未来是一个过程,而不是目的地
Why is network i/o blocked?
随机推荐
安踏DTC | 安踏转型,构建不只有FILA的增长飞轮
Handling file exceptions
GBU1510-ASEMI电源专用15A整流桥GBU1510
Understand the session, cookie and token at one time, and the interview questions are all finalized
Cause analysis and solution of too laggy page of [test interview questions]
Are the microorganisms in the intestines the same as those on the skin?
Line test - graphic reasoning - 2 - black and white lattice class
今日创见|企业促进创新的5大关键要素
Line test - graphic reasoning -5- one stroke class
三菱PLC slmp(mc)协议
Mitsubishi PLC SLmP (MC) protocol
线上面试,该如何更好的表现自己?这样做,提高50%通过率~
Sword finger offer 63 Maximum profit of stock
微信论坛交流小程序系统毕业设计毕设(2)小程序功能
Microbial health network, how to restore microbial communities
智慧社區和智慧城市之間有什麼异同
Exploratory data analysis of heartbeat signal
微信论坛交流小程序系统毕业设计毕设(3)后台功能
Qt Graphicsview图形视图使用总结附流程图开发案例雏形
opencv scalar传入三个参数只能显示黑白灰问题解决