How to copy attachments from RITM to Incident

kutvaram
Tera Expert

I have used the following script in BR after insert :

GlideSysAttachment.copy("sc_req_item", current.request_item.sys_id, "incident", current.sys_id);

But it is not working.

Please do the needful.

Regards,
Ram Prakash

1 ACCEPTED SOLUTION

Thank you. That indicates that the incident is using the parent field to point to the RITM record. In that case, your business rule should be able to copy the attachment from the RITM to the incident record using the copy command I gave earlier if everything else is working properly.



GlideSysAttachment.copy("sc_req_item", current.parent, "incident", current.sys_id);



If not, please use the business rule debugger to ensure your business rule is triggering, or debug statements in your UI action (if that is how you are copying the file.) You may also find this video helpful for debugging:



Faster Server Side Script Development and Test


View solution in original post

16 REPLIES 16

Glad you got it working. Thank you for participating in the community!


Hey Chuck!

I know this is an old thread, however I am trying to accomplish something similar. I wanted to build a Client side UI Action.

A UI Action (I am assuming should be on the HR Task table/form) to grab attachments from the parent HR Case table/form.

Are you able to participate to this from my question post?

Send HR Case Attachments to HR Task

Let me know if you have any indication on how to accomplish this!

Thanks so much!
-Rob