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

Case Team related list on VF page?

I've created a VF page to replace the standard case detail page that uses tabs to show related records from related objects (Assets, Service__c).  I would like to show the case team on it's own tab but I can't seem to get the relationship name.  Everything I try returns the dreaded "'XXXXXX' is not a valid child relationship name for entity Case".


My code is pretty simple:


		<apex:tab label="Team" name="TeamList" id="tabTeamList">
			<apex:relatedList subject="{!thisCase}" list="TeamMembers" />

 I used Eclipse schema browser to get to relationship name "TeamMembers", I also tried the child relationship "TeamTemplateRecords" but get the same error. 


I did search the forums and about the only suggestion was to ensure the related list is present on the standard detail page which I've done.


Does anyone know what relationship name to use?


This is a hail mary shot, but TeamMembers__r  ?


Hey!  I'm taking all comers at this point hail mary or not!  I've struggled for a while but alas that's not it.  it's not a custom object so the __r isn't right...


The schema lists the relationship quite specifically as 'TeamMembers'


Any other plays?




You aren't the only one...


I've always felt there are a lot of weirdnesses around Standard objects where they don't behave consistantly as per Custom object or even other standard objects.   Perhaps this is another one of these?


Can you just retreive the lists explicitly and not use the related list tag?  Just <apex:pageblocktable> it?


I hear ya...  I've read a lot about my shared pain trying to fix this one...


I probably could <blocktable> it...  I've done that before but his one is a little unusual.  The team can be made up of individual users AND predefined teams so somehow the case 'team' is referencing a couple different objects.  Building it manually gets more complicated.


It looks like I'll end up doing that but I'd thought I'd put it out to the world to see if anyone found another way around it...


You'd think with as much activity there is around related lists it would be on someone's radar to fix (!).  Guess I'll have to snoop around at Dreamforce to hopefully find some answers.




I found that by using the plurl form of the standard name, you can get the related list. Try using CaseTeamMembers.

Here is a list of all standard salesforce objects


Did you find an answer to this one, BDArnz? Were you able to create the related list for Case Team Members?


Alas, no...  at least not using the standard related list tools.  Nothing worked.  I had to manually do it:


            <apex:pageBlock >
                <apex:pageBlockButtons >
                    <apex:commandButton action="{!UpdateTeam}" value="Update Case Team Members"/>
                <apex:pageBlockTable value="{!case.TeamMembers}" var="t">
                    <apex:column headerValue="Action">
                        <apex:commandLink action="{!removeMember}" value="Remove" >
                            <apex:param name="MemberToRemove" value="{!t.MemberId}"/>
                    <apex:column value="{!t.MemberId}"/>
                    <apex:column value="{!t.TeamRoleId}"/>


Shannon Andreas 21Shannon Andreas 21
It's AccountTeamMembers when referencing the Account recrod. Might be CaseTeamMembers on the case?