2 Replies Latest reply on Apr 27, 2017 8:36 AM by Guy_Walton

    Deleting Attachments


      Does anyone know a way to Bulk delete attachments ? We have a retention policy that we can only keep documents for a certain amount of time and we want to set up a schedule to clear down of these attachments (HR data).  Any idea's would be most welcome

        • 1. Re: Deleting Attachments

          I don't know if it can be done in inside the application but I wonder if you could do it at the database level.   I've not test this just an idea in case no one offers anything else, the query below would return all attachments form the incident form older than 30 days, you could write a delete statement using that criteria and schedule it to run every so often to clear attachments for that module.    Not sure which modules you use but you may need to do the same for requests/tasks/changes/problems.


          select im_creation_date, * from im_incident_attachment

          where im_creation_date < getdate() - 30 -- (Current Day - 30 days)

          order by im_incident_attachment.im_creation_date

          1 of 1 people found this helpful
          • 2. Re: Deleting Attachments
            Guy_Walton Apprentice

            The following guide may be of use to you


            how to archive/delete attachments?