need to copy attachments from defect table to story though BR

sinu2
Tera Expert

need to copy attachments from defect table to story though BR

 

if attachments are there in defect and enhancement record it should be copied to story record while creating story from those two records ffrom BR

1 REPLY 1

Bert_c1
Kilo Patron

Try looking at OOB BRs for that:

 

https://<instance>.service-now.com/sys_script_list.do?sysparm_query=GOTOnameSTARTSWITHCopy%20attachment&sysparm_view= 

 

and:

https://www.servicenow.com/community/developer-forum/how-to-copy-attachments-from-case-to-case-task/...

 

and for the API:

 

https://developer.servicenow.com/dev.do#!/reference/api/washingtondc/server_legacy/GlideSysAttachmen...

 

Use the following in a BR defined on rm_feature table.

	new GlideSysAttachment.copy('rm_feature', current.sys_id, 'rm_story', current.sys_id);