Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Show Subgrid from Child Entity Lookup's Related Entity

(0) ShareShare
ReportReport
Posted on by 1,846

I have 4 tables.

1. Opportunity

2. Account

3. Shipping Code

4. Shipping Lines

I want to show Shipping Lines (as a subgrid) on Opportunity.

Relationships:

Opportunity have account lookup

Account have Shipping Code Lookup

Shipping Lines have Shipping Code Lookup

How can it be achieved?

  • Suggested answer
    KK-365 Profile Picture
    KK-365 1,010 on at
    RE: Show Subgrid from Child Entity Lookup's Related Entity

    Hi,

    I agree with Leah.

    The easiest approach would be to create a quick view form.

    Do let me know if you face any difficulty.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Show Subgrid from Child Entity Lookup's Related Entity

    Hi MNarmeen,

    Based on your description:

    --Account and Opportunity relationship is 1:N; Shipping Code and Account  relationship is 1:N; Shipping Code and Shipping Lines relationship is 1:N

    Hierarchical Structure:

    So opportunity entity is not directly related to the Shipping Lines entity.

    pastedimage1661841366093v1.png

    If you want to show Shipping Lines (as a subgrid) on Opportunity,It actually shows the information of the parent record of the parent record.

    Generally, you can use quick view form control to view information from parent record, but now it spans two levels of parent entities, so you also need to resort to another control--Form Component Control

    You need refer the following steps:

    1.Create one quick view form for the shipping code, the form only include one sub-grid related to shipping lines. 

    pastedimage1661848384003v3.png

    pastedimage1661847640525v2.png

    2.Create one new main form for the Account

    1)add the Shipping Code Lookup field to the form

    2) add quick view form control to the form and select quick view form created in the 1st step:

    pastedimage1661849153911v4.png

    3.In opportunity form, add the account lookup and set Form Component Control for it.

    pastedimage1661849745986v6.png

    Edit Form property:

    <QuickForms><QuickFormIds><QuickFormId entityname="account">7bcedd84-8ca4-4e19-a896-ef45e309fbeb</QuickFormId></QuickFormIds></QuickForms>

    pastedimage1661849587796v5.png

    Note: 7bcedd84-8ca4-4e19-a896-ef45e309fbeb is form id for the new created main form in step 2, you can get it from the url

    pastedimage1661850012858v7.png

    Save and publish all customizations.

    Result:

    pastedimage1661852115500v8.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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans