Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Need to copy attachment from Incident to order guide before submission

Mohammed Rafi S
Tera Contributor

I have a requirement to create ATF for one order guide but it is expecting mandatory attachment. I am trying to have that automated via run server side script  like below.

 

GlideSysAttachment.copy(source_table_name, source_record_sysid, target_table_name, target_record_sysid);

 

I can see manually  attachment is saving in sys_attachment table and has field table_sys_id . Now i need to copy via some attachment to the order guide so that i can bypass the mandatory attachment validation.

 

thanks

1 REPLY 1

Shaqeel
Mega Sage
Mega Sage

Hi @Mohammed Rafi S 

 

You can try using the below test step for adding the attachment:

Shaqeel_0-1731050731059.png

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.

*************************************************************************************************************

 

 

Regards

Shaqeel

 


***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.

***********************************************************************************************************************





Regards

Shaqeel