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"
2 Answers
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.
I agree with @Prajjwal.
You can follow these steps -
- Create a field on ContentVersion.
- Create a LWC component.
- Remove related files list from layout and create a quick action using lwc.
- 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. Oct 21, 2022 at 15:53
-
1You 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. Oct 21, 2022 at 17:18