Storing deleted attachments
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2017 12:45 PM
I need to be able to retrieve attachments that have been deleted. This function is to keep a record of attachments that were added and then deleted or attachments that were deleted by someone other that the person attaching the document. Does it seem reasonable to store deleted attachments for a specified period of time before they are completely deleted. And if so, how can that be accomplished. I have checked Deleted Records, the attachments are not located there after deletion.
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2017 12:48 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2017 12:49 PM
Hi Anthony,
Interesting use case. Attachments are always associated to some record somewhere. To do this you would need to create your own table that retains the original table_name and table_sys_id values, then you can attach your attachment to that record when a delete operation happens. I'm thinking a BR triggered on delete. It would be sort of an attachment purgatory.
It's an idea - untested, but an idea.
How to get the attachments out or cleaning of that table is another question you have to ask yourself...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2017 12:50 PM
You would probably need to create a custom table to store the "deleted" attachments. So, after a user removes the attachment from a record you need script that would move the attachment to your custom table before the attachment is actually deleted; maybe a before business rule will work for this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2017 12:54 PM
I like the way you think lady!