function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Lisa SeilerLisa Seiler 

Two Master Detail Relationship on one Page Layout

Hi @ all,
i have a Account with a relationship. The object is "Menu". Menu have "Master-Detail" to Account. One more object is "Menu item" This object have a "Master-Detail" to "Menu". Now I want to add the Liste of "Menu" at the Account Layout. This work without any problems. Now I want to add the "Menu Item" list in the list to "Menu" at the page layout from account.  The result should be that I can see all info at the account page to the menu and related menu items. Is this possible?

(I hope it is understandable, my english is not very good ;) )

kaustav goswamikaustav goswami
It is not possible through the standard salesforce detail page. You can go for a custom page which will show you the data in the desired format. You can write a VF page that will show the account details (may be using the <apex:detail> tag and then add the custom code to render the menu and its related menu items in the same page.)

For the above requirement you can create lookup relationship on MenuItem from Account, to prepopulate the list of menu items on Account and for linking menu and menuitems ,you can either create VF page or populate by writing trigger .

Please mark this as best answer if it is helpful .