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
SF 10SF 10 

Setup Retention on Files/Attachments/Notes

How do we ensure that all records greater than 7 years old are deleted? How to setup a retention rules on the textfiles,  pdf  or docs
Hemant_SoniHemant_Soni
Hi,
You need to write a scheduled batch job.
  1. You need to fetch all attachments as per the date range.
  2. then you need to check for type of attachment.
  3. then you can delete.
Thanks
Hemant
SF 10SF 10
I was looking as an admin what I would need to do to setup up a scheduled job to delete different kind of file after certain period of time. I should be able to setup a process to read the retention period and delete files
 
Hemant_SoniHemant_Soni
Hi,
This is not possible with admin. You need a developer who will write a batch job and then you can schedule that batch job.
if you want me to write batch job please let me know. You can direct message me on sonihemant.jaipur@gmail.com with your complete requirement.

Thanks
Hemant