- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2024 08:39 AM
Hello!
I attempted to locate any information about purging specific attachments from a record and didn't find much luck so i'm reaching out here.
I was curious to know if anyone on this forum has purged any attachments from a record and how they went about doing so.
Ideally would like to be able to have the agent choose which attachments gets purged and leave a lovely 'No longer here' message in the activity notes.
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2024 12:40 PM - edited ‎06-28-2024 12:42 PM
If you like, indeed you can have a script run when a user is trying to delete an attachment via the UI. All you need for that is a "before delete" business rule on Attachment [sys_attachment] table that would send the file to your other system just before it gets deleted from ServiceNow. However, if that's not the desired approach, you can also do that via a scheduled job.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2024 11:56 AM
I am not sure I fully understand your question. Attachments can be deleted by users via the UI or you can delete them via a script. You can also configure the system to record the fact of attachment deletion in the work notes, for example. What is your current situation? And what is the exact problem? Are certain users unable to delete certain attachments?
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2024 12:01 PM
Mostly looking to get some advice on pitfalls to look out for when designing. Definitely understand that it can.
Ideally we would want the system to remove the files via a scheduled job that would send it to a Mid Server File to be picked up by another solution.
Unless you're implying that by having hte users delete via the UI it can trigger a script to move the deleted file elsewhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2024 12:40 PM - edited ‎06-28-2024 12:42 PM
If you like, indeed you can have a script run when a user is trying to delete an attachment via the UI. All you need for that is a "before delete" business rule on Attachment [sys_attachment] table that would send the file to your other system just before it gets deleted from ServiceNow. However, if that's not the desired approach, you can also do that via a scheduled job.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2024 12:44 PM
Fantastic, thanks slava. When I get this rolled out, i'll try to put some documenation here so others can benefit.