function preFilterLookup() { Xrm.Page.getControl("to").addPreSearch(function () { addLookupFilter(); }); } function addLookupFilter() { //to lock only for System User fetchXml = "<filter type='and'><condition attribute='isdisabled' operator='eq' uitype='systemuser' value='0' /></filter>"; document.getElementById("to_i").setAttribute("defaulttype", "8"); document.getElementById("to_i").setAttribute("lookuptypes", "8"); document.getElementById("to_i").setAttribute("lookuptypeIcons", "/_imgs/ico_16_8.gif"); document.getElementById("to_i").disableViewPicker = 1; Xrm.Page.getControl("to").addCustomFilter(fetchXml); }
Result:
Hope it helps!
Hi there,
ReplyDeleteIt doesn't seem to work for required/optional attendees on the appointment form, sadly :(
Sander
FetchXML you can here online http://msxrmtools.com
ReplyDeleteThanks for the information and links you shared this is so should be a useful and quite informative!
ReplyDeleteFilter Operator