- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2017 09:56 PM
Hi Team,
Can anyone help me,How to remove multiple attachment from 2 tickets.
Regards,
Saridha.L
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2017 11:15 PM
Use this script to remove all attachments:
var attachment = new GlideSysAttachment();
var agr = attachment.getAllAttachments("<table_name>" <record_Sys_id>");
//example: var agr =attachment.getAllAttachments("incident","7123398d4f317a048d853d828110c731");
while(agr.next()) {
attachment.deleteAttachment(agr.getValue("sys_id"));
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2017 10:08 PM
Hi Sridha,
Open the tickets and click on manage attachments and choose all record and click remove. Attachments will be removed
Thanks,
Malaisamy
Mark Helpful if it helps!!!!!!!!!!!!!!!!!!!!!!!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2017 10:12 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2017 10:48 PM
Thanks for reply..
Actually some tickets got 10k+ attachments. So is there any other way to remove it.
Regards,
Roopa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2017 10:50 PM
Oh,
so that case you need to hit on sys_attachment table directly.