[SalesForce] Show Enhanced Notes in VisualForce page

We had a Visualforce page showing the Notes and Attachments using:

<apex:relatedList subject="{!Object__c}" list="CombinedAttachments" />

We recently decided to stop using attachments to instead use Enhanced notes and Files. We've already changed all objects layouts to show the new related lists, but the visualforce page still shows the old Notes and Attachments one.

I've managed to show the Files related list (AttachedContentDocuments) but the one for enhanced notes keeps throwing an error with the following message "'AttachedContentNotes' is not a valid child relationship name for entity Process", I've checked the metadata of the object in eclipse and that is the name of the relationship name.

Works:

<apex:relatedList subject="{!RS_Activity__c}" list="AttachedContentDocuments" />

Doesn't work

<apex:relatedList subject="{!RS_Activity__c}" list="AttachedContentNotes" />
<apex:relatedList subject="{!RS_Activity__c}" list="Notes" />

Has anyone managed to show the new enhanced notes in a Visualforce page ?

Thanks

Best Answer

What meta-data apiversion is the visualforce page using? I have a page on version 36.0 with the following mark-up which displays the related list.

<apex:relatedList list="AttachedContentNotes" />

Also you need to ensure you have enabled enhanced notes in setup > Notes > Note Settings