Using the Developer Console as System Admin:

The result of this query: SELECT Id FROM ContentDocument

does NOT contain the row returned from this query: SELECT Id FROM ContentDocument WHERE Id='069xxxxxxxxx'

I've also tried ContentVersion.ContentDocumentId queries - also no luck.

The Salesforce UI does show that record to me (I can upload new versions for example).

Is there a better way (Apex) to get all ContentDocument records?

1 Answer 1


Are you the record owner? If no, then it looks like a known issue: Obtaining all ContentDocument records using SOQL

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .