web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

fillLookupFromSearch not working correctly if user uses tab to navigate

(0) ShareShare
ReportReport
Posted on by 2

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? 

pastedimage1656084297240v1.png

Thx for your help!

Regards,
Alan

I have the same question (0)
  • Petr Jantac Profile Picture
    Microsoft Employee on at

    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

  • Alan Rachid Profile Picture
    2 on at

    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

  • Suggested answer
    Petr Jantac Profile Picture
    Microsoft Employee on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Manoj - ManoVerse Profile Picture

Manoj - ManoVerse 77 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 43

#3
Chris1968 Profile Picture

Chris1968 20

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans