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
JJenkinsJJenkins 

Error Message Help

This is a follow up to another question I posted yesterday about building tabs

 

I am trying to follow the tabs in 30 seconds wiki entry but it's for a custom object and it's custom related lists.

 

If I can get the first tab working the rest is cake.  I keep receiving this error message

 

 

Error: Unknown property 'Clients_For_Life__cStandardController.Transition_Meeting__c'

 for this code:

 

 

<apex:page standardController="Clients_For_Life__c" showHeader="true" tabStyle="Clients_For_Life__c" > <apex:detail subject="{!Clients_For_Life__c}" relatedList="true" title="true"/> <apex:relatedList list="OpenActivities"/> <apex:pageBlock > <apex:tabPanel selectedTab="name2" id="theTabPanel"> <apex:tab label="Transition Meeting" name="Transition Meeting" id="Transition_Meeting__c"> <apex:relatedList subject="{!Transition_Meeting__c}" list="Transition_Meeting__c" /> </apex:tab> </apex:tabPanel> </apex:pageBlock> <apex:relatedList list="NotesAndAttachments"/> <apex:relatedList list="ActivityHistories"/></apex:page>

 

 Any help would be appreciated as this is my first project in VF and I'm learning as I go along.

 

Thanks, 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
jdl2009jdl2009

If Transition_Meeting__c is a child object 

 

Try

list="Transition_Meetings__r" 

All Answers

Rajesh ShahRajesh Shah

The problem is in the following line

 <apex:relatedList subject="{!Transition_Meeting__c}" list="Transition_Meeting__c" /> 

 In the list attribute, you need to mention the Relationship Name. For eg:

 

<apex:relatedList list="OpenActivities" />

 Find out what is the relationship name and use that. You can check out the relationship name in Apex Explorer or Salesforce Schema browser in Eclipse. Go to the parent Object, drill down to the child relationships and you will find the relationship name.

 

 

JJenkinsJJenkins

That makes sense.

 

second newbie question - where do I find the apex explorer?

 

I searched in SF and can't find it. 

Rajesh ShahRajesh Shah

You can also check the Child Relationship name by going to the detail of the field which establishes the relationship between the 2 objects.

 

You can find apex explorer at the following link

http://wiki.developerforce.com/index.php/Apex_Explorer

Message Edited by Rajesh Shah on 10-20-2009 09:03 PM
JJenkinsJJenkins

That's what I did - I thought maybe there was a tool I wasn't aware of.

 

It gives me "Transition_Meeting" as the child relationship name but then when I go to the VF page i get a new error message stating "Transition_Meeting" is not a valid child relationship name for entity Clients for Life.

 

any thoughts? 

Rajesh ShahRajesh Shah

Thats weird.

 Try changing the relationship name and use the new name then in the code. 

JJenkinsJJenkins

Thanks so much for all your help.

 

I took out the underscore and made it "TransitionMeeting"

 

here is the code:

 

 

<apex:tabPanel selectedTab="name2" id="theTabPanel"> <apex:tab label="Transition Meeting" name="Transition_Meeting__c" id="Transition_Meeting__c"> <apex:relatedList subject="{!Clients_For_Life__c}" list="TransitionMeeting" /></apex:tab></apex:tabPanel>

 

 But I am still getting the same error message as before but with "TransitionMeeting" now

 

Rajesh ShahRajesh Shah
What happens if you remove the subject attribute? Since you are using standard controller, I don't think theres need to specify it.
JJenkinsJJenkins
i still receive the error message
jdl2009jdl2009

If Transition_Meeting__c is a child object 

 

Try

list="Transition_Meetings__r" 

This was selected as the best answer
JJenkinsJJenkins

That worked!

 

Can you tell me why that is? 

jdl2009jdl2009

hmm... no :)

It took me a while to figure that out. 

 

 

__r because is child object but I don't know why you need to add the "S"