Hey Experts,
I have build a marketing form with a lookup field. First obstacle I have is that for filtering the elements to show you can only use certain default views. Can somebody confirm this?
While finding a way around this I found the awesome functionality to inject JavaScript into the form to filter the lookup on render:
MsCrmMkt.MsCrmFormLoader.on("afterFormLoad", function() {
MsCrmMkt.MsCrmFormLoader.fillLookupFromSearch("2c1b6325-caf3-ec11-bb3d-000d3abf3315", "- Power Platform Webinar")
.then(function (r) {
console.log("Success performing search");
}).catch(function (e) {
console.error("Error performing search");
});
});
This is kind of working. When I move the cursor from one field to another field by selecting it with a mouse click, the entries are getting filtered as needed. However when using the tab-button to move into the field the field is loading all entries.
Somebody experienced this too and knows how to fix it?
Thx for your help!
Regards,
Alan
Hi Alan,
It should be possible to select custom queries to filter lookup fields. Please file a support ticket to ensure we can assist further. Our support engineers would then be able to check your environment. admin.powerplatform.microsoft.com/
Thanks
Petr
Hey Petr,
thank for your reply. I was trying the approach you are mentioning but it looks like that you can only choose default saved queries and no personal queries. Can you confirm this?
Cheers,
alan
Hi Alan,
You can select a view when the lookup field is set up. There is an option to use saved (already existing) query in the lookup field. That's the best way to see the intended values in the lookup field (better than using JS for filtering on the fly).
Thank you.
Petr
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,151 Super User 2024 Season 2
Martin Dráb 229,963 Most Valuable Professional
nmaenpaa 101,156