Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Filter Lookups by Related Records in Dynamics 365

Jump to Best Answer
  • 1.  Filter Lookups by Related Records in Dynamics 365

    SILVER CONTRIBUTOR
    Posted 23 days ago
    Edited by Rodrick Hales 23 days ago
    I have attempted to filter a lookup field by a parent record. I continue to get all the records of the target lookup I would like to filter. I don't want to use Javascript or a Plugin.

    At one point two or three months ago, I got this to work on several custom entities. I believe I used the links below and it was fairly simple.
    Is it possible I could be missing some steps along the way?

    What is the step everyone forgets to perform?

    https://www.marksgroup.net/blog/dynamics-365-lookup-field-filtering/
    https://carldesouza.com/filtering-lookup-fields-in-dynamics-365/

    #relatedrecords #filter
    ------------------------------
    Rodrick Hales
    Vertex Aerospace
    Madison
    ------------------------------
    ​​​​
    Academy - Online Interactive Learning from Experts


  • 2.  RE: Filter Lookups by Related Records in Dynamics 365

    Posted 22 days ago
    Hey Rodrick,
    So what entities and entity relationships are you working with?
    Also did the relevant filtering options available on the lookup field at all?




    ------------------------------
    Xun Dong
    Thomas Miller
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 3.  RE: Filter Lookups by Related Records in Dynamics 365

    SILVER CONTRIBUTOR
    Posted 22 days ago
    I am working with two custom entities. When I click on the lookup field, I get the magnifying glass on the right. When I click that, it shows all the entries for that lookup (between 400/500).

    ------------------------------
    Rodrick Hales
    Vertex Aerospace
    Madison
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 4.  RE: Filter Lookups by Related Records in Dynamics 365

    Posted 21 days ago
    Rodrick,

    Sounds like you have the following set up?
    Entity A and Entity B. On Entity B you have a lookup field based on Entity A.
    If the above assumption is what you have got so far,  then what you missing is the 3rd entity which consumes the both Entity A and B.

    So in brief, it would be something like this
    Entity A - "Country"
    Entity B - "City"
    Entity B has a lookup field based on Entity A Country (but this is not the lookup that you can use the filter feature)
    Entity C  - Account or any other entity it has 2 lookup fields
                        lookup field A - lookup Country (here you may apply the filter only returns countries that is on the selected city)
                        lookup field B - lookup City (or to add the filter to return only those cities that contains the selected  Country)
    It is these 2 lookup fields on Entity C's Form that you may apply the Filter.


    Please have a closer look of the 2nd link you reference in the original post. It should work. Despite the lookup field will by default show recent records, only after click "All Records" link it will then return the filtered results.

    Hope this makes sense.

    Xun

    ------------------------------
    Xun Dong
    Thomas Miller
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 5.  RE: Filter Lookups by Related Records in Dynamics 365

    SILVER CONTRIBUTOR
    Posted 20 days ago
    Thanks. This scenario is very similar. I will take a look at it again. I did this before and it was very simple.

    For now since the form was very specific, I formed an associated view that should do well.

    I really do wish I could do it the other way easily.

    ------------------------------
    Rodrick Hales
    Vertex Aerospace
    Madison
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 6.  RE: Filter Lookups by Related Records in Dynamics 365

    Posted 22 days ago
    Also maybe you are just looking at the recent records of the lookup field?
    Click on the lookup field and it will show all recent records by default, you should then get a "All Record" link on the top right of that lookup field.
    Click on that give me filtered results based on the selected parent record.

    any luck?

    ------------------------------
    Xun Dong
    Thomas Miller
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 7.  RE: Filter Lookups by Related Records in Dynamics 365

    SILVER CONTRIBUTOR
    Posted 22 days ago
    I do not see "All Records" anywhere. I do see where it says "Look Up More Records" link towards bottom of list.

    ------------------------------
    Rodrick Hales
    Vertex Aerospace
    Madison
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 8.  RE: Filter Lookups by Related Records in Dynamics 365
    Best Answer

    SILVER CONTRIBUTOR
    Posted 16 days ago
    I created this scenario in another environment this morning and it worked on the first try.

    Perhaps there are some issues with environment.

    Thanks.

    ------------------------------
    Rodrick Hales
    Vertex Aerospace
    Madison
    ------------------------------

    Academy - Online Interactive Learning from Experts


If you've found this thread useful, dive deeper into User Group community content by role