+ Start a Discussion
Chetna AgrawalChetna Agrawal 

how to display note related list in visualforce page

i want related list for notes which contain new note button on lead detail page.
<apex:page standardController="Lead">
    <apex:pageBlock >
    <apex:relatedList subject="{!Lead}" list="CombinedAttachments" />
     <apex:relatedList list="Note" />
it is not working.
SonamSonam (Salesforce Developers) 

You should be using the below tag to get Notes related list:
<apex:relatedList list="AttachedContentNotes"/>

Chetna AgrawalChetna Agrawal
Thanks sonam, now i am able to see notes and new note button.
but after click on new note button i am getting error like "Action you performed was invalid for session.
SonamSonam (Salesforce Developers) 
Good to know the related list is available on VF.

The resolution to the session error is explained in the link below:

Pls try it out.
Chetna AgrawalChetna Agrawal
thanks for reply,
i have enabled feed tracking but it is not working, still i am getting the same error.
SonamSonam (Salesforce Developers) 

Can you please share your updated VF code in the thread? I will try it out in my dev org.
Akhilesh DahatAkhilesh Dahat

Hello Sonam,

I tried with two approaches after switches to lightning mode

<apex:relatedList  subject="{!account}" list="OpenActivities" /> - "We couldn't find the record you're trying to access. It may have been deleted by another user, or there may have been a system error. Ask your administrator for help"

<apex:relatedList list="AttachedContentNotes" />   -- "The action you performed was invalid for your session. Please refresh your page and try again."