We have three object Opportunity ---> Vendor ---> Vendor Items. The relationship between all these objects are Master Detail. i.e. Opportunity is Master and Vendor is Detail, and Vendor is Master and Vendor Items are details.

We have a requirement to display like below on a single page

---> Vendor
----------- here show all vendors
---> Vendor Items
-----------here show all vendor items

While it is easy to show Vendor as related list below Opportunity. But how can I also show Vendor Items below this? Please advise. If it is LWC... please elaborate it a bit for me. thanks

  • this has to be done with either LWC, Aura, or VF that uses a controller to create the three-level hierarchy and the client-side renders the tree. REST tree resource could be quite useful. See also this LWC tree example
    – cropredy
    Commented Mar 29, 2022 at 17:10

2 Answers 2


One way would be to add a lookup field on Vendor Items to Opportunity.

With a direct relationship established, you can add a related list on Opportunity.

After that, you just need to propagate the Opportunity Id from your Vendor record down to its related Vendor Item records. That would be handled by a trigger (or perhaps a record-triggered flow?).

  • thanks for the response. This option we dicussed but then discarded as it would further complicate the relatioships between these objects. Also, even if we do this...it wont be displayed on the same page. Pls correct if m missing anything here....
    – user105281
    Commented Mar 29, 2022 at 10:59
  • @user105281 There's no way to avoid adding complexity when you add new things. The complexity will appear somewhere. Adding a single new relationship field is about as little extra complexity as you'll find, in my opinion. The extra related list will also be available on the Opportunity record detail page (same as with the Vendor related list).
    – Derek F
    Commented Mar 29, 2022 at 11:11

I'm using a screen flow with a data table on a View only mode and was able to achieve this without creating new lookup field.

On this screen flow, use get record to get the child records then loop through child records and put Ids into a collection variable and get grandchild records using "In" operators in the Ids collection.

Use the Data Table to display these grandchild records

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .