如果“查找”下拉菜单包含多个项目(例如,帐户,联系人),则可以设置默认选项(在我的方案中为第二个选项联系人)?
答案 0 :(得分:0)
在CRM 2015中,如果要过滤查找以使其仅包含联系人
,则可以使用以下内容// Filter the dropdown of the lookup so that it only contains contacts + do not allow accounts ,in the contact views, visible when the user clicks more records
var noAccountsfilter = "<filter type='and'><condition attribute='statecode' operator='ne' value='0' /></filter>";
Xrm.Page.getControl("parentcustomerid").addCustomFilter(noAccountsfilter, 'account');
答案 1 :(得分:-2)
function Form_OnLoad()
...
preFilterLookup();
..
}
function preFilterLookup() {
Xrm.Page.getControl("customerid").addPreSearch(addLookupFilter);
}
function addLookupFilter() {
document.getElementById("customerid_i").setAttribute ("lookuptypenames", "contact:2:Contact");
document.getElementById("customerid_i").setAttribute("lookuptypes", "2");
}
How do I change the default quick form for the CustomerId field in Dynamics CRM 2013?