Display associated records on a Dynamics 365 form’s ‘Related’ tab

Introduction

The post illustrates how to display related (associated) records on a Dynamics 365 form’s ‘Related’ tab. This is explained by using the example of associating multiple receipts to an invoice. The solution is shown in Figures 1 & 2

The Solution

Figure 1
Figure 2

Technical Implementation

1.) In the Receipt entity, a lookup field is created which also creates a relationship between the Receipt and Invoice entities (Figure 3)

Figure 3

2.) Define the custom name ‘Associated Receipts’ (Figure 4)

Figure 4

A N:1 relationship is created (Figure 5). That means multiple receipts can be attached to the one invoice

Figure 5

3.) The relationship is specified on the Invoice form (Figure 6)

4.) The ‘Show navigation items’ is selected on the Invoice form

Figure 7

5.) The newly defined lookup field is placed on the Receipt form

Figure 8

After the changes are published, a receipt can be associated to a particular invoice

Figure 9

Further reading

Xrm.Utility.lookupobjects to add records to a subgrid

https://www.xrmtoolbox.com/plugins/Rappen.XrmToolBox.RelatedRecordsAnalyzer/