5

When a user is looking at a case or contact, I'd like them to only see Files associated to the record, but not have the ability to upload a File.

Right now, the Standard Files Related List allows for uploads: enter image description here

I'd like this component to only show existing files, but prevent uploading new files.

I tried looking at Profiles and permissions, but there's no dedicated section for Files (which is not a surprise - they're really a combination of ContentDocument, ContentVersion and ContentDocumentLink), and the related list in the page layout editor doesn't let you adjust the actions you can do there:

enter image description here

I'm trying to avoid having to create a custom lightning component myself, but that seems to be the only route at the moment...

1 Answer 1

4

I suggest writing a trigger on ContentVersion Object to prevent user from uploading the file on case and contact object. We do not have any such permission to restrict user from uploading a file from local drive if user have the permission to read or edit the object.

To attach files to records: Read OR Edit on the object

By the way, you have ability to prevent user uploading Salesforce existing files, not from local drive.

  1. From Setup, enter User Profiles in the Quick Find box, and select Profiles.
  2. Click Edit next to the user profile you want to change.
  3. In the Administrative Permissions section, enable or disable the Select Files from Salesforce checkbox, and click Save.

NOTE:- Another option is to apply the permission in a permission set. Users who have this permission disabled are still able to upload files from their local drive. To apply the permission in a permission set, from Setup enter Permission Sets in the QuickFind box, then select Permission Sets. Edit the permission set and apply the Select Files from Salesforce permission.

Reference:- Prevent Users from Attaching Salesforce Files

3
  • Trigger is a really nice approach, thanks for the suggestion. But Re: the preventing user uploads reference, if you read the documentation carefully - it only doesn't allow them to attach existing Files in Salesforce to other Salesforce objects, or chatter, etc. Remove that last part and I'll accept the answer :-) Commented May 9, 2019 at 13:58
  • 1
    Yes @BrianMiller I have clear the confusion now. Commented May 9, 2019 at 14:03
  • I didn't understand how writing a trigger on ContentVersion will solve the problem. I don't want to use custom lwc because it will miss on Select Files from Salesforce..@sanketkumar
    – mvk1991
    Commented May 7, 2021 at 10:07

You must log in to answer this question.

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