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
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)
2.) Define the custom name ‘Associated Receipts’ (Figure 4)
A N:1 relationship is created (Figure 5). That means multiple receipts can be attached to the one invoice
3.) The relationship is specified on the Invoice form (Figure 6)
4.) The ‘Show navigation items’ is selected on the Invoice form
5.) The newly defined lookup field is placed on the Receipt form
After the changes are published, a receipt can be associated to a particular invoice
Further reading
Xrm.Utility.lookupobjects to add records to a subgrid
https://www.xrmtoolbox.com/plugins/Rappen.XrmToolBox.RelatedRecordsAnalyzer/