Unable to copy RITM attachments to related records using Business rule

Anjali Priya
Tera Contributor

I'm trying to copy attachments uploaded on a catalog form (while raising the RITM) to related records (in another table), but it's not working using a Business rule.
My actual requirement is: 

  • User submits a catalog form.
  • Multiple excel files are attached to to the form while submitting.
  • Each file name represents a unique ID (like 1001, 1002, 1003...).
  • After RITM creation, each attachment should be copied to the matching record (respectively) in a custom table (which has the records having values like 1001, 1002, 1003...).

I have tried creating a BR on sc_req_item table (After - insert) and used GlideSysAttachment,copy() as well as copyBySysId() APIs, but either they are copying all the attachments in all the records, or not copying them at all.

What is the recommended/best-practice way to copy the attachments respectively to the records in another table?
Any guidance would be appreciated. Thanks!

 

0 REPLIES 0