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

copy attachments from parent to child record through background script

Nitya2
Kilo Guru

Hi All,

 

Kindly help me to provide background script  copy attachments from parent to child record 

parent - incident

child - u_azure_devops   custom table

 

i tried  with   GlideSysAttachment.copy('incident',current.sys_id,'u_azure_devops  ', current.u_azure_devops   );

 

and few other ways but not working , kindly provide correct code

there are few attachments already there for these records  , we need to skip those and only not attached attachments only has to process

2 REPLIES 2

Abhishek_Thakur
Mega Sage

Hello @Nitya2 ,

 

You can refer my below post, where I have explained how to move attachment from one table to another.

 

https://www.linkedin.com/posts/abhishek-thakur-4636a722b_servicenowdeveloper-servicenowadmin-service...

 

Please accept my solution and give thumbs up, if it helps you.

Nitya2
Kilo Guru

could you please give for background/fix script , i have already Businessrule working for ongoing tickets.

needed for existed/old tickets