当前位置:网站首页>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的生成引用自
边栏推荐
- What does the model number of asemi rectifier bridge kbpc1510 represent
- 微信论坛交流小程序系统毕业设计毕设(7)中期检查报告
- 30讲 线性代数 第五讲 特征值与特征向量
- LeetCode203. Remove linked list elements
- Txt file virus
- Class implementation of linear stack and linear queue (another binary tree pointer version)
- Adrnoid开发系列(二十五):使用AlertDialog创建各种类型的对话框
- What is ADC sampling rate (Hz) and how to calculate it
- 面试百问:如何测试App性能?
- PMP项目管理考试过关口诀-1
猜你喜欢
随机推荐
Brush question 3
【测试面试题】页面很卡的原因分析及解决方案
It's no exaggeration to say that this is the most user-friendly basic tutorial of pytest I've ever seen
Handling file exceptions
Line test - graphic reasoning - 1 - Chinese character class
Unity dynamically merges mesh textures
Online interview, how to better express yourself? In this way, the passing rate will be increased by 50%~
Installing vmtools is gray
Class implementation of linear stack and linear queue (another binary tree pointer version)
Qt Graphicsview图形视图使用总结附流程图开发案例雏形
Talk about DART's null safety feature
14、 Two methods of database export and import
Sword finger offer 63 Maximum profit of stock
2021-01-11
每日一题——PAT乙级1002题
About idea cannot find or load the main class
网络安全-sqlmap与DVWA爆破
Why is network i/o blocked?
JMeter-接口自动化测试读取用例,执行并结果回写
Unity 动态合并网格纹理
![Leetcode19. Delete the penultimate node of the linked list [double pointer]](/img/a9/809b93d1ffd11ba4a9074ac8e2bdee.jpg)








