Hello,
On CRM 2015 I was able to define custom filters on lookups with th followinf JS (for example) :
function OnLoad() {
Xrm.Page.getControl("regardingobjectid").addPreSearch(PreSearchIncident());
}
function PreSearchIncident() {
var RegardingFilter = "<filter type='and'><condition attribute='incidentid' operator='not-null'/></filter>";
document.getElementById("regardingobjectid_i").setAttribute("defaulttype", "112");
document.getElementById("regardingobjectid_i").setAttribute("lookuptypes", "112,1,2");
Xrm.Page.getControl("regardingobjectid").addCustomFilter(RegardingFilter, "incident");
}
It worked well.
But today on CRM 2015 SP1(Carina) it doesn't work anymore.
Has someone any ideas in order to meet the following requirements:
- Regarding Object : by default incidents
- To : Only Contacts
Thanks a lot in advance for your help.
Christophe
*This post is locked for comments