We have a custom object where we are allowing users to load files. Now, we need to provide user a check box before uploading this files into Salesforce so that we can revisit those files for data retention policy. can we add a check box which says, Retain after 60 Days ? In the below image as soon as I click on Upload files, it asks me the location of the file on my computer and when I chose a file, and right before I say upload, we wanted user to have a check box which says "Retain after 60 Days"

enter image description here

enter image description here

  • No, you cannot add a checkbox here. Commented Oct 27, 2022 at 4:39

2 Answers 2


I agree with @Prajjwal.

You can follow these steps -

  1. Create a field on ContentVersion.
  2. Create a LWC component.
  3. Remove related files list from layout and create a quick action using lwc.
  4. In LWC component you can use standard file upload which will return file details on upload finish method and use the modal to allow user to select checkbox. And then save checkbox value content version.
  • Hmm I see. So the only way is to have it in a custom way ! Fair enough. thanks Prajwal & Gaurav. Let me check if something can be built using flows and keep you guys posted. Commented Oct 21, 2022 at 15:53
  • 1
    You can do it using flows also as file upload component is available in flows. But you still need to create a custom field. It is always better to use declarative approach, so flows will be better option. Commented Oct 21, 2022 at 17:18
  • thanks. I was able to acheive the custom LWC part for uploading. But you know, there are other places where Add Files / Upload files will be visible. I couldn't see any option to override those std button. Thought of putting some validation in place saying, Users have to upload files only using the custom component which was created. Any thoughts ? Commented Mar 31, 2023 at 5:54
  • In that case, either you can remove related list and create custom component to show the uploaded files or you can refer this link - salesforce.stackexchange.com/questions/166991/… Commented Mar 31, 2023 at 16:34
  • thanks. Yeah. I am going with custom component approach. found one article which has this solution to this kind of scenario. Commented Apr 3, 2023 at 14:49

I have implemented similar kind of thing by creating a custom upload by using lightning-file-upload and created a field in the ContentVersion object.

  • How did you override the std button in this case ? I'm sure this add files / upload file button is visible like under related list. Any thoughts on this pls ? Commented Mar 31, 2023 at 5:56

You must log in to answer this question.

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