Can we delete the attachment in ServiceNow, I want to know is that best practice?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2024 03:44 AM
Hi Community,
I have created case form using Record producer on CSM Portal and attachments are passing from case to incident and vice versa
Client raised the below question:
*Attachment "Rabbit_1.jpeg" was uploaded to INC0031920 and then deleted. The image file is deleted from the INC comments as well but it still shows up in CS0001148. If I accidentally upload a file and then realized it is not the one I wanted to share, it should delete from all the places related to the INC*
Can we delete the attachment in ServiceNow, I want to know is that best practice?
Thanks,
Srinivasu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2024 04:14 AM
Hi @Srinivasu2, Yes we can delete the attachments from ServiceNow. There is sys_attachment table where all the attachment files are stored. so you can simply go the the table and enter the sys_id of the record in the Table Sys ID field. You will get all the files attached to that record then you can delete the file that you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @PratikK098 , I am still learning how things in ServiceNow function. If we delete an attachment from the attachments table, how can I tell if a cascade of deletions has happened? Is the message below meaning that the attachment will remove from other linked records?
This is the message I receive when I go to delete an attachment from a KB created in 2020 (it's linked to 3 other records) -
Info MessageDeleting data can cause unexpected cascade deletion. Preview the number of records that will be affected before continuing and change the conditions if needed. When ready, schedule deletion by specifying "Run at" value or click "Execute Now" link to execute immediately. A rollback context will be created after execution.
Thank you in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Seems you will need to review the 'Reference cascade rule' as described here:
for all tables that have a reference field to the sys_attachment table: