Query All ContentNote using SOQL

Salesforce Enhanced Note is saved in both ContentNote and ContentDocument object with the same record id 069xxxxxxxxxxxx. By default, only the note owner or someone has been granted Viewer or Collaborator permission will have access to the Note.

When an Admin user query ContentNote object without specifying the record id, only the note has been explicitly shared with the user thru ContentDocumentlink will be returned. This behaviour has been documented here.

To allow a user to query all notes without having to specify the note record id. ‘Query All Files’ App Permission can be assigned to the user thru Profile/Permission Set.

Query All Files permission

References:

Query All Files in Release Note

 


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s