locked
Displaying Filtered Subgrid on a custom entity form RRS feed

  • Question

  • I have created a custom entity called "Implementation" and I need to display a subgrid on the form that shows all Registered Products (Entity linked to the Account Entity).

    Implementation has an N:1 relationship to the Account entity.  Account also has a 1:N relationship to the "Product Registration" entity which holds the Registered Products to the Account.

    So, the relationships are Implementations(s) --> Account <-- Product Registration(s)

    On the main Implementation form, I have created a subgrid and selected "Related Records" but Registered Products is not listed as it is an indirectly linked entity.  If I select "All Records", I can select Registered Products but it displays all Products that are registered (i.e. not filtered by the Account for the Implementation form).

    How do I get the subgrid to only return registered products relating to the parent Account?


    Dominic Saunders

    Thursday, July 24, 2014 7:45 PM

All replies

  • Hi,

    you could try to use deep query in subgrid to get data from indirect relationship, Check this blog for your reference


    Our Website| Our Blog | Follow US | My Facebook Page | Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Friday, July 25, 2014 4:39 AM
    Moderator
  • Hi,

    Thanks for this - I tried this yesterday, but the results returned are all Registered Product Records that were linked to ANY Implementation (i.e. not just the current one).  I assume this is because the relationships in the blog are Parent --> Child --> Child, whereas in my scenario I have Child --> Parent <-- Child. 

    As per the blog you mentioned, the FetchXML returns the Registered Products and I then added the Link Entity Implementation using the AccountId which is in both Product Registration and Implementation entities.

    I am sure it is something along these lines, but I cannot figure it out!

    Dom


    Dominic Saunders

    Friday, July 25, 2014 7:50 AM