+ Start a Discussion

Attachment Related list only shows when Combined with notes

I built a VF page for the Case object and I pulled the Attachments with this line:
<apex:relatedList id="Attachments" list="Attachments" />

I replaced the Case object with a custom object called lda_Request__c. I tried to build a simlar VF page with the attachment related list using the same line as above. I got the following error:
“'Attachments' is not a valid child relationship name for entity New Request.”

So, I confirmed the relationship exists. I can query it using SOQL:
SELECT Id, ownerId, (Select Name From Attachments) FROM lda_Request__c limit 100

I can see the relationship in Eclipse:
Attachment Relationship

I can also get the attachment related list with this line:
<apex:relatedList id="Attachments" list="CombinedAttachments"/>
But this also shows the notes.

Why can I not get the attachment related list by just using "Attachments"?
Best Answer chosen by ethanone

You need to use CombinedAttachments .


Mark this as solution, if it solves your problem.