dynamics-crm - 业务流程中的查找过滤器
解决方案
不幸的是,无法访问 BPF 字段属性窗口,并且无法像我们在表单部分中进行任何其他查找一样自定义查找字段属性。
但是有一种方法,我们可以使用 Javascript 来应用查找过滤器 usingaddPreSearch
方法。这是完全支持的。阅读更多
function filterBpfLookup = function(formContext){
if (formContext.getControl("header_process_mag_contactlookupid") != null){
formContext.getControl("header_process_mag_contactlookupid").addPreSearch(filterDefinition);
}
}
function filterDefinition = function(formContext) {
var accountId = null;
var accountLookup;
var filterBpf;
if (formContext.getControl("header_process_mag_contactlookupid") != null &&
formContext.getControl("header_process_mag_contactlookupid").getAttribute().getValue() != null){
accountLookup = formContext.getControl("header_process_mag_accountlookupid").getAttribute().getValue();
accountId = accountLookup[0].id;
if (accountId != null || accountId != undefined){
filterBpf = "<filter type='and'>" +
"<condition attribute='mag_accountlookupid' operator='eq' value='" + accountId + "' />" +
"</filter>";
formContext.getControl("header_process_mag_contactlookupid").addCustomFilter(filterBpf);
}
}
}
推荐阅读
- javascript - 将事件侦听器添加到动态创建的 KonvaJS 图像形状
- java - Java 等价于 PHP 函数
- html - Facebook mbasic 站点、移动 Safari、主屏幕快捷方式和本地存储
- c# - 单行匿名方法
- c - 我需要逐字从文本文件中获取命令
- postgresql - DataGrip PostgreSQL 存储过程错误
- c# - UWP C# PivotItem 无法识别命名空间
- jsf-2 - 我正在处理 jsf 中的 ViewScoped 注释,但没有得到正确的输出
- c# - OrmLite 传递参数的元组
- c# - 用于选择带有数值的大括号并忽略大括号内的空格的正则表达式