当前位置:网站首页>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的生成引用自
边栏推荐
- 30讲 线性代数 第五讲 特征值与特征向量
- OC variable parameter transfer
- Innovation today | five key elements for enterprises to promote innovation
- Are the microorganisms in the intestines the same as those on the skin?
- ./ setup. Insufficient sh permission
- V20变频器手自动切换(就地远程切换)的具体方法示例
- 数据库每日一题---第22天:最后一次登录
- Unity and webgl love each other
- Why is network i/o blocked?
- Sword finger offer 63 Maximum profit of stock
猜你喜欢
【测试面试题】页面很卡的原因分析及解决方案
十四、数据库的导出和导入的两种方法
The wonderful relationship between message queue and express cabinet
行测-图形推理-1-汉字类
Understand the session, cookie and token at one time, and the interview questions are all finalized
leetcode-520. 检测大写字母-js
Introduction to redis and jedis and redis things
Use JfreeChart to generate curves, histograms, pie charts, and distribution charts and display them to jsp-2
一次搞明白 Session、Cookie、Token,面试问题全稿定
Gbu1510-asemi power supply special 15A rectifier bridge gbu1510
随机推荐
ADC采样率(HZ)是什么怎么计算
微信论坛交流小程序系统毕业设计毕设(4)开题报告
微生物健康網,如何恢複微生物群落
V20变频器手自动切换(就地远程切换)的具体方法示例
Exploratory data analysis of heartbeat signal
数据库每日一题---第22天:最后一次登录
定位到最底部[通俗易懂]
Basic knowledge of linked list
Talk about DART's null safety feature
2021-01-12
Installing vmtools is gray
It's no exaggeration to say that this is the most user-friendly basic tutorial of pytest I've ever seen
Online interview, how to better express yourself? In this way, the passing rate will be increased by 50%~
[language programming] exe virus code example
Innovation today | five key elements for enterprises to promote innovation
线上面试,该如何更好的表现自己?这样做,提高50%通过率~
网络安全-永恒之蓝
Clean C disk
2021-01-11
opencv scalar传入三个参数只能显示黑白灰问题解决