Copy attachment from one table to another table

Aishwarya20
Tera Contributor

Hi,

I created 1 custom table, in that I have created 3 fields- 1. Asset tag 2. serial no. 3. File attachment, for testing purpose I have created 2 records, I want to copy that attachment(with respect to same asset tag record on asset table) and attach into alm_asset table.

I need to create scheduled job for this, whenever i execute that scheduled job, all attachments copied from custom table to asset table with same asset tag records.

Please help me with code

 

Thanks

5 REPLIES 5

Hello Aishwarya,

The copy method copies all attachments from source record to target record.

You need to pass the source table, source sys_id of the record that contains the attachments, target table and target sys_id of the record that will receive the copied attachments.

Hope this helps!

Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!

Best Regards,

Filipe Cruz