Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Ask for help. Filter a picklist field base upon a lookup field

Posted on by Microsoft Employee

Hi, all

I'm looking for a way to filter the available options in a picklist (optionset) field based upon the value of another lookup field?

I found most of information are all about configuration for two lookup fields or javascript code for dependent optionsets.

Is there any solution to filter a picklist field based on a lookup field?

Thank you for your help.

*This post is locked for comments

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Ask for help. Filter a picklist field base upon a lookup field

    There is not an easy solution, like there would be the other way around using pre-filter.

    If you wanted to filter your lookup based on an optionset, you could use pre-filtering to filter the data in your optionset

    In your case you would need to add an onChange event to the lookup and check for the value in the lookup (id or name).

    From there you can do a switch statement to decide what to do with the picklist in each one of these scenarios.

    I would recommend to see if you can replace the picklist with another lookup, or replace the first lookup with a picklist.

    Hope this helps. If you have further details that can help us assist you please provide example of what you are trying to achieve, and why not use two lookups or option set as first field and lookup as second.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans