You need to sign in to do that
Don't have an account?

Chatter Files are not visible by query
Hi!
I have 2 users. I want to create chatter file using insert ContentVersion with Origin=H; from the first user and access it from the second user using query. The problem is that I can see uploaded file in Files tab from both users, but cannot access it using query only from owner user. Do anybody know how to solve this?
Thank you
Let me know if this SOQL query helps
SELECT ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId = '[RECORD ID]'
Please follow the link below for more info
http://salesforce.stackexchange.com/questions/564/how-to-query-all-chatter-files-attached-to-a-record
Please let me know if this was useful
Best Regards
Naga Kiran
Hi Naga,
Thank you for your answer, but no, this query and article didn't help to solve my problem. This queries have returned an empty list
Select c.VersionData, c.Id, c.FileType, c.ContentLocation, c.ContentDocumentId From ContentVersion c where c.Id = 'Chatter file ID'
Have you found any solution, workaround or explanation for this issue?
I'm facing the same problem. According to my research, an admin with the "See All Data" permission may see private files in UI (on the Files tab), but such files are not available for him via SOQL-query to ContentVersion object. So, it looks like Salesforce uses some kind of internal magic to get more data for standard pages than we can get in custom code.