Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a simple Visualforce page that has the following:

<apex:page standardController="Account">
   <apex:outputField value="{!Account.Name}"/><br />
   <apex:relatedList subject="{!Account.Contacts}" list="AccountContactRoles"/>

When I navigate to the page it gives me the following error.

Unable to Access Page

The value of the "id" parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information.

I am specifying a valid Account ID in the URL: 

When I remove the <apex:relatedList> the page renders with the Account Name correctly.

Is there some other parameter or value that I need for the <apex:relatedList> when used with a child? I don't ever remember needing anything else.

I'm in a DE that is Winter '13.

share|improve this question
I removed the Subject Attribute and tried. It worked. Dont know what that means, but just FYI. – Shailesh Deshpande Feb 7 '13 at 11:41
In your example i think you need to correct {!Account.Contacts} to {!Account.Contacts[0]} because apex:relatedList subject expected ID value of the record. I have tried this, but then I got another problem: 'AccountContactRoles' is not a valid child relationship name for entity Contact. After research i found that AccountContactRoles related list on the Contact object is not visible for some reason :( Here some info:… – Sergey Utko Feb 7 '13 at 12:42
@mast0r - Thanks! That's interesting... – Peter Knolle Feb 7 '13 at 12:56
up vote 4 down vote accepted

My error...what I really wanted was the related list of each contact. Something like the following:

<apex:page standardController="Account">
       <apex:outputField value="{!Account.Name}"/><br />
       <apex:repeat value="{!Account.Contacts}" var="contact">
           <apex:outputText value="{!contact.Name}"/>
           <apex:relatedList subject="{!contact}" list="AccountContactRoles"/>

I was incorrectly specifying a List as the subject, when I needed an object.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.