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 :
Microsoft Dynamics CRM (Archived)

2 related subgrids on one Form or how visualze parent-child-grand-child relationship

(0) ShareShare
ReportReport
Posted on by 727

Hi

 

2 related subgrids on one Form or how visualize a parent-child-grand-child relationship?

 

I have following simple requirement.

Let's assume there 3 entities

C


Relationships are as follows:
A:B ==> 1:N

B:C ==> 1:N

 

This means C is grandchild of A.

 

Now I want to a Form for entity A which displays two subgrids (one for entity B and the other for entity C).

These subgrids should be dynamically. This means: Subgrid C should only display grandchild records of the selected child record in subgrid B. When I change the selected record in subgrid B then subgrid C should refresh.

 

How can such functionality be achieved?

Thanks

Alen

*This post is locked for comments

I have the same question (0)
  • alen1979 Profile Picture
    727 on at

    Sorry - nobody had ever had such a requirement ?

  • Verified answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi Alen,

    I would try to find a different implementation for the business case, but if you're married to the idea of having grids you might be able to make it work.

    First, you need to get an event for when the B record is selected in your subgrid. There's expanded functionality for this in 2015 and Online, I'm not sure what's available in 2013. Here's the details for 2015: msdn.microsoft.com/.../dn932126.aspx

    When the event fires from your B grid, you need to have javascript that updates your C grid. You want to do that by overriding the FetchXml that's used in the grid. In the FetchXml, you can put a filter on the C entity so the B lookup corresponds to the record selected in your other grid. Here's details on how you'd do that:
    joshimandarblog.wordpress.com/.../crm-2015-applying-custom-fetchxml-to-a-subgrid-using-javascript

    I hope this helps with what you're looking for. If it's helpful, I'd appreciate if you would mark this as the verified answer.

    Thanks,
    Aiden

  • Paige Cassada Profile Picture
    on at

    Alen,

    Although I have used filtered lookups - using one lookup to determine the values available to choose in another lookup, many times what you are requesting is the auto fill of one subgrid based on another subgrid. Essentially causing the second subgrid to be refreshed dynamically where records are added or removed depending on what records are chosen in the first subgrid. Possibly a custom webpage could mange this but I do not believe it is possible out of the box due to the recursive nature of the request. The solution would have to go through all the C records that are related to the B records that are related to the A record and add them to the A record.

    There are several developers that follow this forum, maybe one of them has a suggestion. I will ask the developers I work with for suggestions as well.

    Good luck!

  • Suggested answer
    PS Profile Picture
    23,577 on at

    The following URL might be helpful:

    joshimandarblog.wordpress.com/.../crm-2015-applying-custom-fetchxml-to-a-subgrid-using-javascript

  • Suggested answer
    Ronald Hulshof Profile Picture
    on at

    Hi Alen, I just wrote a blogpost describing a clean non-coding alternative to solve your issue. Hope it helps you:

    D365 Display Grandchildren in Subgrid View without Coding

  • Linn Zaw Win Profile Picture
    3,407 on at

    For Subgrid C, you can achieve with deep queries for subgrids.

    https://cloudblogs.microsoft.com/dynamics365/no-audience/2012/04/16/deep-queries-for-subgrids/

    It only works in the legacy web client and not supported in the Unified Interface anymore.

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans