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
Shraddha K 3Shraddha K 3 

"Upload Files" button is shown in enhanced notes related list section

There is no 'New Note' button in the Notes section displayed in detail view overridden by VF page , instead its "Upload Files" in the lightning interface.

In classing both enhanced notes and files are working fine but in lightning there is “Upload Files” button in Notes section.
Anyone is having idea why this is happening?
Thanks
Upload File button in notes section
Khan AnasKhan Anas (Salesforce Developers) 
Hi Shraddha,

Greetings to you!

As per Salesforce knowledge article: 

In Lightning, the Notes & Attachments related list only has the ‘Upload Files’ button available. This is expected and if users need the ability to interact with notes, an administrator will need to enable enhanced Notes and apply the Notes related list to layouts. See Considerations for Setting Up Notes (https://help.salesforce.com/articleView?id=notes_considerations.htm&type=5) and Files and Content: What’s Different or Not Available in Lightning Experience (https://help.salesforce.com/articleView?id=lex_gaps_limitations_files_and_content.htm&type=5) for more details.

Please refer to the below link which might help you further with the above requirement.

https://help.salesforce.com/articleView?id=000228993&language=en_US&type=1

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Shraddha K 3Shraddha K 3
Hi Anas,
Thank you for your reply. I've already enabled Enhanced notes and placed Notes and Files (enhanced versions) on standard page layouts.
In the above case , objects view page is overriden with VF page and when I open the same in lightning , there is only "Upload Files" button available in notes section.
I am not sure what is the cause of this.
Thanks,
Regards,
Shraddha 
Raj VakatiRaj Vakati
You can change your SOQL query like this  in where condition ContentDocument.FileType!='SNOTE'
List<ContentDocumentLink> cdl=[select id,LinkedEntityId,ContentDocumentId from ContentDocumentLink where LinkedEntityId=:recordId AND ContentDocument.FileType!='SNOTE'];  
        for(ContentDocumentLink cdLink:cdl){  
            documentIds.add(cdLink.ContentDocumentId);  
        }      
        DocumentList = [select Id,Title,FileType,ContentSize,Description from ContentDocument where id IN: documentIds];

 
Shraddha K 3Shraddha K 3
Hi Raj Vakati,
Thank you for your reply.
I am using standard related list tag on visualforce page like this.
<apex:relatedList list="AttachedContentNotes" subject="{!contract}" />
<apex:relatedList list="CombinedAttachments" subject="{!contract}" />
Please suggest what I can do here.
Thanks,
Regards
Shraddha K