function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Lakshmi SLakshmi S 

Notes Related list : visualforce component not working in Lighting.

Hi Team,

Visualforce new notes related list componet not working in Lightning.
<apex:relatedList subject="{!High_Risk_Success_Factors__c}" list="CombinedAttachments" />

Please let me know, how can we do this in lightning.

Thanks
Lakshmi
NagendraNagendra (Salesforce Developers) 
Hi Lakshmi,

You need to hide the chatter feed on the page so the Note object sees it (needs chatter.) You cannot simply set rendered to "false" on the chatter tag (prevents the feed from being detected by the AttachedContentNotes object.) It would be nice if SalesForce updated the Component reference library on the related list. See this for more detail on using chatter tags. Added this to my static resource CSS file:
.hidden{ 
  display: none; 
  }
Or if not using static resource place this on the VisualForce page:
<style>
    .hidden{
        display:none;
    }
</style>
VisualForce Page component:
<apex:stylesheet value="{!URLFOR($Resource.pdfcssresource_CRE, 'CREresource_CRE.css')}"/>
.....
<!-- AttachedContentNotes uses chatter. Need to embed chatter tag and hide it in order to create Note on VisualForce page --> 
    <div class="hidden">
    <chatter:feed entityId="{!$User.Id}" id="ChatterFeed"/>
    </div>
    <!--------------------------------------------------->
    <apex:relatedList list="AttachedContentNotes" />
Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra


 
Lakshmi SLakshmi S
Hi Nagendra,

It is redirected to notes, but unable to add note. If i am trying to add note text automatically erased.
Please let me know how can i resolve this.

Thanks,
Lakshmi