Copy attachment from req to case and the ritm

is_12
Tera Contributor

Hello,

Using an box integration from the 3rd party attachment is getting added on the request (in the pin icon), Now need to copy this attachment to the case & the RITM of that request, need an solution for this.

is_12_0-1742271128570.png

Thanks,

looking forward for the solution

3 ACCEPTED SOLUTIONS

Ankur Bawiskar
Tera Patron
Tera Patron

@is_12 

wherever the attachment is copied to REQ, there only query sc_req_item with this REQ then use GlideSysAttachment.copy() function

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

SanjivMeher
Kilo Patron
Kilo Patron

Instead of copying the attachments to these records, you can probably create a Relationship record, which would be the most efficient way of showing the attachment. Copying attachment will have more complexity and multiple copies of the same attachment.
Solutions in below blog should help you
https://www.servicenow.com/community/developer-blog/tnt-quot-related-attachments-quot-related-list/b...


Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

Community Alums
Not applicable
3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@is_12 

wherever the attachment is copied to REQ, there only query sc_req_item with this REQ then use GlideSysAttachment.copy() function

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

SanjivMeher
Kilo Patron
Kilo Patron

Instead of copying the attachments to these records, you can probably create a Relationship record, which would be the most efficient way of showing the attachment. Copying attachment will have more complexity and multiple copies of the same attachment.
Solutions in below blog should help you
https://www.servicenow.com/community/developer-blog/tnt-quot-related-attachments-quot-related-list/b...


Please mark this response as correct or helpful if it assisted you with your question.

Community Alums
Not applicable