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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Filter Lookupfield Marketingpage

(0) ShareShare
ReportReport
Posted on by 34

Ha all,

I am trying to use the Lookup Filter as described in https://learn.microsoft.com/en-us/dynamics365/marketing/marketing-fields

MsCrmMkt.MsCrmFormLoader.on("afterFormLoad", function() {
MsCrmMkt.MsCrmFormLoader.fillLookupFromSearch("b9051065-5851-41db-94bc-b7e1dc6bb646", "Microsoft")
.then(function (r) {
console.log("Success performing search");
}).catch(function (e) {
console.error("Error performing search");
});
});

Although the filter works, it still enables the user to manually type in the lookup field, therefor bypassing the set filter (it will lose the "Microsoft" filter as set in the example).
Setting the Lookup field to Read Only also does not help, because although any typed characters won't appear in the lookup field, it still queries and shows any results based on the characters entered,.

Any idea on how to keep the filter working without (!!) setting the filter in the used view?

I have the same question (0)
  • Verified answer
    Eiken Profile Picture
    on at

    Hi, Stevie

    You can control the availability of the input box.

    I add some code to make user unable to enter content in input box, only select the lookuo filter.

    You can refer to my steps.

    1.Go to the Marketing forms, select the form and click HTML

    pastedimage1673504287594v1.png

    2.Add code to control the input to be unselected.

    pastedimage1673504311456v2.png

    3.Now we can only select the filtered ones.

    pastedimage1673504327785v3.png

  • Stevie_nld Profile Picture
    34 on at

    You....are the bomb! This already cost me so much of my free time trying to fix this....much appreciated!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans