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

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Filter country,state,city lookups in CRM

(0) ShareShare
ReportReport
Posted on by 255

Hi All,

I got new requirement in CRM i want to filter sate and city lookup accordigly.

can anybody suggest possible ways and how to do it.

I have the same question (0)
  • Verified answer
    LuHao Profile Picture
    40,890 on at
    RE: Filter country,state,city lookups in CRM

    Hi Mona,

    We will do it using Lookup Field Filtering in the form.

    Please refer to https://carldesouza.com/filtering-lookup-fields-in-dynamics-365/

    First, create 1: N relationship between entities Country and State, State and City.

    pastedimage1584521448725v5.png        pastedimage1584521470973v6.png

    Then populate the lookup fields of State and City to correlate the three entity records.

    Open the form editor with the country, state and city lookup fields. Set the properties of the State and City lookup fields and enable "Only show records where".

    pastedimage1584521266509v2.png

    For the State lookup field, the first selects the Country lookup field (form entity), and the second selects the lookup field for the relationship between State and Country (States).

    pastedimage1584521554324v7.png

    For the City lookup field, the first selects the State lookup field (form entity), and the second selects the lookup field for the relationship between City and Sates (Cities).

    pastedimage1584521355280v4.png

    The effect is as follows.

    I have two countries, four states, and eight cities.

    pastedimage1584521803931v10.png        pastedimage1584521820329v11.png

    When I select a country and state, the lookup fields only shows the state related to the country and the city related to the state.

    pastedimage1584521643700v8.png    pastedimage1584521671938v9.png

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Sahan Hasitha Profile Picture

Sahan Hasitha 394

#2
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 123

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 106 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans