The CreatorCon Call for Content is officially open! Get started here.

Move Attachment from Requested Item to Catalog Task Flow Designer

Anthony16
Tera Guru

Right now attachments that come in on a RITM do not get sent over to the catalog task item that gets created. Is there a way to move it from the RITM to the sc_task that gets created easily with flow designer? I know Flow designer has a move attachment option but I am not that familiar with flow designer.

2 REPLIES 2

sachin_namjoshi
Kilo Patron
Kilo Patron

Use below solution to copy attachment from requested item to catalog task.

 

https://community.servicenow.com/community?id=community_question&sys_id=8ba983e5db5cdbc01dcaf3231f96...

 

Regards,

Sachin

 

 

AbhishekGardade
Giga Sage

Hello Anthony,

#Copying an Attachment from One Table/Record to Anothet Table/Record:

Copying all of the attachments associated with a given record is fairly straightforward. You simply call the copy method of the GlideSysAttachment class, and pass in four parameters:

  • The table you want to copy the attachment from (incident, change_request, etc.).
  • The sys_ID of the record you want to copy the attachment from.
  • The table that you want to copy the attachment to.
  • The sys_ID of the record you want to copy the attachment to.

This might look something like this: 

var donorTable = sc_req_ite’;//

var donorID = '2b6644b15f1021001c9b2572f2b47763';

var recipientTable = sc_task; //

var recipientID = '78e47fe94f31d200bf004a318110c7d4';

GlideSysAttachment.copy(donorTable, donorID, recipientTable, recipientID);

Thank you,
Abhishek Gardade

Thank you,
Abhishek Gardade