Copy attachment from reference field table record to particular record

AJAYKUMAR G
Tera Contributor

Copy attachment from reference field table record to particular record

1 ACCEPTED SOLUTION

Sohail Khilji
Kilo Patron
Kilo Patron

Hi @AJAYKUMAR G 

 

Make use of :

 

GlideSysattachmentCopy(source sys_id, target sys_id);


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

View solution in original post

4 REPLIES 4

Sohail Khilji
Kilo Patron
Kilo Patron

Hi @AJAYKUMAR G 

 

Make use of :

 

GlideSysattachmentCopy(source sys_id, target sys_id);


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

In business rule?

Yes you can use it in any server side script like below code :

 

GlideSysAttachment.copy('incident','8dce5f603733310099322b2943990e3c','change_request','0f425d0e37cdb2003332261953990e05');

 

so here the incient table attachement will be copied to the change_request table.  sys_id of records are passed of source and targert table records.


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

Same table For example
I have one reference field that's shows previous case number 
the condition is 
when ever that field is selected any case number I want that case attachmet to be copied to particular record.