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"/>
</apex:page>
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:
https://c.na14.visual.force.com/apex/contacts?id=001d000000VtORJ
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.
{!Account.Contacts}to{!Account.Contacts[0]}because apex:relatedListsubjectexpected 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 thatAccountContactRolesrelated list on the Contact object is not visible for some reason :( Here some info: boards.developerforce.com/t5/Best-Practices-Discussion/… – Sergey Feb 7 at 12:42