Have you ever wanted to display a view from different entity and there was no straight relationship? Worry not! I finally figured out how to do it. So, let’s just jump into it!
1) Have two entities with common related entity, my ex. Opportunity, Tag, related entity Account (there is a N:N relationship between Tag and Account).
2) Have a subgrid on entity (Opportunity) which shows all the records from the entity you want to show (Tag) and get it’s FetchXML using the advanced find.
3) If you don’t know the name of the intersect entity, find it using the REST Builder - it should look like this: prefix_entity1_entity2. https://github.com/jlattimer/CRMRESTBuilder
Note that we are creating a new FetchXML, it should look same as the one from the subgrid except the conditions with filter type “or”.
It should look like this:
And that’s it!
In order to use this function, add it onload of the form and you’re good to go.
Leave a Comment
Your email address will not be published. Required fields are marked *