When we configure flow designer to copy the attachments from one record to another record with copy attachment action it is throwing an error and we are unable to see the attachment on the target record.

Error message:

The Record type sc_req_item does not match with Attachment table type. (sys_script_include.5430bdf89313130079b5925cf67ffb04.script; line 30)


-To achieve the requirement of copying the attachments from one record to another record we need to follow a different process
-First it requires to look up the attachments from the triggered record id
-Then we need to look up the record with lookup attachment sys_id from the sys_attachment table
-Now we need to configure copy attachment action with source record as 'attachment record' from look up record action
-Now save it, activate it then test the flow with any of the existing or submitting new request with attachment.

Since we are configuring the lookup attachment action with triggered record sys_id the copy attachment action will not understand which is sys_id of the attachment in source record as we are not defining where the exact location/table the attachment is going to be stored.

With look up record action, we will get the attachment record to pass into copy attachment action.

Article Information

Last Updated:2020-06-08 18:21:19