I have managed to build a Custom-lookup-field with Mutliselection with the help of the Xrm.Utility.lookupObjects(lookupOptions)-function. Everythings work fine.
But I have to filter the views. I know, that I can add custom filters to my lookupOptions. But I have no idea how to create such a filter in XML.
Do anybody know a link where I can find informations about that?
The Filter should work like this:
The Lookupfield is on a case-form. With this lookup you can choose the product (customentity) which belongs to the case. But in this field you should only see the products of the customer. The products are linked to the customer.
Hi Ar0x,
Below is the sample code of how you can create the custom view filter via XML.
//Random view guid var viewId = "026e2e12-4512-4fc9-aee8-e938afe748d6"; //Entity logical name for which you have to create custom view var entity = "jasanz_technicalresource"; //View display name var ViewDisplayName = "Filtered Technical Resources"; //Fetch xml you want to create var fetchXML = "" "" "" "" "" "" "" "" "" "" "" "" condition "" "" "" "" ""; //Layout column of the view var layout = "" "" "" "" ""; //Filter view formContext.getControl("jasanz_technicalresourceid").addCustomView(viewId, entity, ViewDisplayName, fetchXML, layout, true);
Best Regards,
Kirti Singh | Soluzione IT Services
Please mark as verified if the answer is helpful.
Hi Ar0x,
This has been posted in Dynamics 365 Supply chain management forum. But the query is related to Dynamics 365 customer engagement customization.
Please refer to the below URL on creating xml filter for look up field.
If you still have queries kindly post in the appropriate forum.
Regards,
Vignesh
XRM? Are you sure you're in the right forum?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,219 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156