Following is a code snippet for adding custom filter in lookup in dynamics CRM.
function onPageLoad()
{
var LookupControl = Xrm.Page.getControl("new_marketinglist");
if (LookupControl != null) {
var fetchXml = "";
LookupControl.addPreSearch(function () {
LookupControl.addCustomFilter(fetchXml);
});
}
}
Leave a Reply