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
cinov8cinov8 

Custom Object as related list in tabbed view

I'm trying to modify my Account view from displaying related lists to a tabbed interface.  I have done this successfully with standard objects, but I get an error when I try to append a Custom Object related list.

 

 <apex:tab label="Expenses" name="Expenses" id="tabExp">
         <apex:relatedList subject="{!account}" list="Expenses" />
 </apex:tab>

 

I have a Custom Object "Expense" with a master-detail relationship to Accounts.  I use the proper child relationship name but I get an error stating "Expenses" is not a valid child relationship to the Account entity.

 

Any thoughts? Thanks!

Best Answer chosen by Admin (Salesforce Developers) 
jwetzlerjwetzler
Expenses__r?

All Answers

jwetzlerjwetzler
Expenses__r?
This was selected as the best answer
cinov8cinov8
Perfect...thanks!
Frenchy52Frenchy52

I am trying to do the same thing with my account layout and it always tells me that this related list is not  a child of the account object. Do all the related list have to be children of the account so that can work?

thanks.