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?


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

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.