0

The SharingPrivacy (File Privacy) is set as "Visible to Anyone With Record Access". I've a screen flow (running in system mode). This flow is on the Account record. It is supposed to get all associated files as displayed in the data table.

The files are displayed to users who uploaded them but not to other users. I'm using Get ContentVersion where FirstPublishLocation = recordId. This accurately yields the results but is based on who the user is. If I were to run the flow as another user, I see the recordId (The other user is also able to view the record) but Get ContentVersion wouldn't return the results if a file was uploaded by a different user

However, if I use Get ContentDocumentLink where LinkedEntityId = recordId, I get the results no matter who the user is.

I'm stumped as to where I'm missing out on ContentVersion. Any help/suggestions are really appreciated

Update: When I first fetch ContentDocumentLink based on LinkedEnityId = recorded, add these Ids to list variable (IdList), and then Get ContentVersion where ContentDocument IN IdList, I get all the records. It's weird that GetContentVersion based on firstpublishedlocation is acting differently in terms of Sharing

1 Answer 1

0

I got an official response from the Salesforce team. Looks like FirstPublishedLocation has field-level security that enables it as read-only for the owners of the ContentVersion

You must log in to answer this question.

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