Hi Friends,
I am trying to show the Lookup dialog using "Xrm.Utility.lookupObjects" but filter is not working.
I have web resource inside form, Now on button click i am showing lookup dialog with specific view, I want to further apply filter to the view.
Below is code for reference:
var messageId = "{8C203514-6679-418g-77AD-16B52067LA96}"
var fetch = "<filter type='and'><condition attribute='kv_message' operator='like' value='" + messageId +"' /></filter>";
var encodedURL = encodeURIComponent(fetch).replace(/'/g, "%22");
var lookupOptions = {
defaultEntityType: "kv_message",
defaultViewId: "{7C203514-4879-418D-99AD-12B52067AC82}", // GUID of the View
viewIds: ["{7C203514-4879-418D-99AD-12B52067AC82}"], // GUID of the View
entityTypes: ["kv_message"],
allowMultiSelect: false,
disableMru: true
filters: { entityLogicalName: "kv_message", filterXml: encodedURL } //Not working
};
parent.Xrm.Utility.lookupObjects(lookupOptions).then(function (returnValues) {
if (returnValues.length == 0)
return;
}, null);
how to apply filter to lookup dialog ?
how to show all the entities? ( apart from comma separated option)
Thanks!
just for reference lookup screen:
Regards,
Santosh
*This post is locked for comments