0

I want to run the following SOQL and want to get all the ContentDocument from all users.

SELECT OwnerId, Title, FileType, LatestPublishedVersionId, ContentModifiedDate, CreatedDate FROM ContentDocument

But actually, the result ContentDocument is only the ones which owner is mine. If I change Query All Files in Setting (※1), I can see all data but its not good in terms of security because for enabling Query All Files, users need to read other objects (for example, Accounts, Contacts). I want normal user (not System Administrator) to see Files. How can I do this without the Query All Files in Setting?

※1 Obtaining all ContentDocument records using SOQL

New contributor
Yuuhi Yoshida is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

Yuuhi Yoshida is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.