Is there a way by using Import sets Attachments in an Incident Table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2017 03:02 AM
Hi All,
I have a request where we have bulk data of Incident which needs to be moved to the Instance , However the challenge is they have provided a separate attachment which needs to be attached to all the Incident.
Has any one has any idea about how to add a attachment to list of Incident.
Appreciate you help.
Thanks ,
Srinivas
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2017 11:19 AM
You can use the attachment API in a script.
Or you can do it via script by inserting into ecc queue:
Convert your attachment to base64
var inc = new GlideRecord('incident');
inc.query();
while(inc.next()){
var ecc = new GlideRecord('ecc_queue');
ecc.initialize();
ecc.agent = 'AttachmentCreator';
ecc.topic = 'AttachmentCreator';
ecc.name = 'file_name.xls:application/vnd.ms-excel' // or whatever the file name is + its content-type
ecc.soruce = 'incident:' + inc.sys_id;
ecc.payload = '<attachment base 64>';
ecc.insert();
}