Displaying Grandparent Entity Data on a Child Form in Dynamics 365 (Without Direct Relationship)




In many Dynamics 365 implementations, there are scenarios where you need to display data from a grandparent entity on a child form—even when there’s no direct relationship between the grandparent and the child. Recently, I encountered a situation with three entities:

  • Entity A: Grandparent

  • Entity B: Parent (related to A)

  • Entity C: Child (related to B, but not directly to A)

The challenge? Show Entity A's data on Entity C's formwithout directly relating Entity A to Entity C. Here’s how I solved it using Quick View Forms and form components.


πŸ“Š Scenario Breakdown

Let’s clarify the relationships:

  • Entity A ↔ Entity B: Direct relationship exists.

  • Entity B ↔ Entity C: Direct relationship exists.

  • Entity A ↛ Entity C: No relationship exists.

Despite this, our goal is to show Entity A’s information on Entity C’s form.


🧩 Step-by-Step Implementation

πŸ”Ή Step 1: Create a Quick View Form on Entity A

First, I created a Quick View Form for Entity A, and added all the fields I wanted to display (name, status, custom fields, etc.). This form will serve as the reusable container of Entity A's data.

Why Quick View?
Quick View Forms are ideal for showing data from a related entity without having to duplicate fields or build custom integrations.


πŸ”Ή Step 2: Create a New Main Form on Entity B

Since Entity B is directly related to both A and C, it acts as the bridge. Here's what I did:

  • Created a new Main Form on Entity B.

  • Placed the Quick View Form of Entity A onto this new Entity B form.

  • As a result, whenever Entity B is opened, it shows related data from Entity A.

This form essentially becomes a “composite” view showing both Entity B and Entity A data.


πŸ”Ή Step 3: Display Entity B’s Form in Entity C

Now comes the key part—getting this form onto Entity C:

  • On Entity C’s form, I added a lookup field to Entity B (which already existed due to their relationship).

  • Then, using Form Components (custom page, embedded form, or PCF component depending on your tech stack), I embedded the Entity B form (the one that includes the Quick View of A).

This way, when a user opens an Entity C record and selects a related Entity B, the form displays:

  • Entity B's data

  • Entity A’s data via the Quick View

And all of this without ever directly relating Entity A to Entity C.


✅ Benefits of This Approach

  • No redundant relationships: Keeps your data model clean.

  • Reusability: The same Entity A Quick View can be used in other forms too.

  • Maintenance-friendly: Changes to Entity A's data model only require updates in one Quick View Form.

Comments

Popular posts from this blog

How to Use Pre-Image in Power Automate

Power Apps - Trigger Power Automate Flow On Approval Reassign

Power Pages - Multi Select Field Show Hide and Set Business Required Using Javascript