Our Requirement: On Click of Ribbon button a dialog should open based on the search criteria?
Show Account(Ribbon Button) --> OOTB Lookup Dialogbox --> It should show all the accounts matching email address that is passed as criteria.
I am successfully able to open the account records using OOTB Lookup dialog.
Issue: How to pass filter criteria? can I pass email address as filter criteria through URL or is there any other approach.
//Get entity data. It requires oData query.
function OpenLookupWindow() {
debugger;
url = Xrm.Page.context.getServerUrl() + "//_controls/lookup/lookupsingle.aspx?class=&objecttypes=" + 1 + "&browse=0&DefaultType=0";
var ret = window.showModalDialog(url, null);
if (typeof (ret) != "undefined") {
alert(ret.items[0].id);
}
}
Thank You!