Deleting documents from attachment type attributes
search cancel

Deleting documents from attachment type attributes

book

Article ID: 251532

calendar_today

Updated On:

Products

Clarity PPM On Premise

Issue/Introduction

We want to delete thousands of documents that are uploaded to incident subobject attachment type attributes. We would like to delete those files in a supported way without needing to run delete statements on the database side. We have seen there is an OOTB job called Purge Documents, but it looks like it is limited to certain objects.

Can this be modified to handle the deletion of attachment-type field contents on objects like the incident subobject? 

Cause

The job is designed to delete only certain object attachments: Resources, Projects, Knowledge store and Companies 

Resolution

1. Locate the attachments you want to delete at the CLB_DMS_FILES table.

    example: SELECT * FROM CLB_DMS_FILES WHERE name= 'myattachmentfilename'

2. Run the following update statement

    UPDATE CLB_DMS_FILES SET PURGE = 1 WHERE name= 'myattachmentfilename'

3. Run the Purge Documents job with no parameters selected.