Loading

Administrator users unable to query All ContentNote and ContentDocument

Julkaisupäivä: Apr 2, 2026
Kuvaus

Administrator users are unable to query all ContentNote and ContentDocument objects using SOQL or Apex. The query returns only records owned by the running user, even when the user's profile includes the 'View All Data' (VAD) system permission. This occurs because ContentNote and ContentDocument follow a separate file-sharing model in Salesforce, where VAD does not override file visibility. The 'Query All Files' permission must be explicitly enabled to allow querying all files regardless of ownership.

Ratkaisu

Enable the "Query All Files" permission for the Salesforce System Admin profile. Unless this option is enabled, you can only query records that you own even if you have View All Data.
 

Steps to enable the permission for users:

1. Set Up > Permission Set > New.

2. Enter the preferred details.

3. Click Save.

4. Click App Permissions.

5. Click Edit,

6. Navigate to "Query All Files".

7. Check the "Query All Files" checkbox.

8. Click Save.

9. After that, click Manage Assignments.

10. Click Add Assignments.

11. Check all Users you want to add, then click Assign.

 

Knowledge-artikkelin numero

000395050

 
Ladataan
Salesforce Help | Article