You need to sign in to do that
Don't have an account?
ethanone
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:
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:
I can see the relationship in Eclipse:
I can also get the attachment related list with this line:
Why can I not get the attachment related list by just using "Attachments"?
<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:
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"?
You need to use CombinedAttachments .
refer:https://developer.salesforce.com/forums/ForumsMain?id=906F00000008rzSIAQ
Mark this as solution, if it solves your problem.