function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
David Zhu 8David Zhu 8 

Get Id of File Loaded by Community User

Hi All,
I came across an issue of getting the Id of file loaded by community users.

In my case, community users can load file to a record of a custom object through Notes and Attachments related list.

I understand the file is loaded to contentversion object.

I tried to run soql: select id,title,owner.name from contentVersion. But the files are not listed until I share the file to admin (myself).

I am able to get those files through "Files" tab in Salesforce.

What is the trick here?

Thanks,
David