How to remove multiple attachment

Saridha_L1
Tera Expert

Hi Team,

Can anyone help me,How to remove multiple attachment from 2 tickets.

Regards,

Saridha.L

1 ACCEPTED SOLUTION

Gowrisankar Sat
Tera Guru

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"));  


}  


View solution in original post

8 REPLIES 8

malaisamyj
Tera Contributor

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!!!!!!!!!!!!!!!!!!!!!!!!


Gowrisankar Sat
Tera Guru

Hi,



remove att.GIF


There should be a checkbox besides every attachment and remove button which will remove all the attachments.


Community Alums
Not applicable

Thanks for reply..



Actually some tickets got 10k+ attachments. So is there any other way to remove it.



Regards,


Roopa


Oh,



so that case you need to hit on sys_attachment table directly.