You need to sign in to do that
Don't have an account?
Spirus
'NotesAndAttachments' is not a valid child relationship name for entity
Keep struggling with this issue for days.
In every custom object that has a "view" visualforce page when I try to add the 'NotesAndAttachments' as a related list I have the error "'NotesAndAttachments' is not a valid child relationship name for entity". I have added the 'NotesAndAttachments' related list to the Standard Page Layout and I am using the following code line in the visualforce page :
<apex:relatedList subject="{!test__c}" list="NotesAndAttachments" />
Am I missing anything?
Please let me know of your thoughts.
Hi,
you can have the related list of notes&Attachement in Vf page, but by the follwing method,
<apex:page standardController="CMDData__c" tabStyle="CMDData__c">
<apex:form >
<apex:pageBlock title="Notes">
<apex:pageBlockTable value="{!CMDData__c.Notes}" var="note">
<apex:column value="{!note.createddate}" width="120px"/>
<apex:column value="{!note.createdbyid}" width="120px"/>
<apex:column value="{!note.body}" />
</apex:pageBlockTable>
<apex:pageBlockButtons location="top">
<apex:commandbutton value="Add Comment" action="/002/e?parent_id={!LEFT(CMDData__c.Id,15)}&retURL=%2Fa01i0000006QrQ9"/> //This is the url we get when standard related list Add notes buttton is clicked. So take that and modify.
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
Here CMDData__c is my custom object.
Hope so this helps you...!
Please mark this answer a Solution and please give kudos by clicking on the star icon, if you found this answer as helpful.
I notice that your subject is a custom object. Do you something you're binding to? In order for the related lists to work on my VF pages I have to do them with controller objects.
Say I have an Account page I'm writing a VF page for, my related list code looks like this, where TempAccount is the Account object that I am viewing.
This issue seems to have been caused by the latest Version 29 that Salesforce just published. I have VF Pages with V28 and before that work fine. As soon as I upgraded those pages to V29, the problem appears.
Please check the Solution:
http://boards.developerforce.com/t5/General-Development/Notes-and-Attachments-on-Visualforce-Page-Standard-Controller/m-p/704867#M105119
Thanks,
Sarv
Hi Spirus,
Please look on the below blog...
This may helpful for your Problem...
http://salesforcekings.blogspot.in/2013/11/view-all-your-attachment-in-visualforce.html