if any attachments submitted with the HR case, include those attachments in the email.

snehalkausa
Tera Contributor

Hi

I am working on a flow(hr core scope) where I am using the send email action to send case-related details. The challenge is copying the HR Case attachments into the email notification.

Attempt 1: OOB “Copy Attachment” Action
I tried using the out-of-the-box Copy Attachment action in Flow Designer.
Issue:
This did not work because the flow is in HR_Core scope, and I cannot access the sys_email table due to scope restrictions.
Attempt 2: Custom Flow Action – Copy via sys_attachment. Fetching the data from sys_attachment, if any record found copy that file to target table
var success = GlideSysAttachment.copy(
'sn_hr_core_case_compensation', // Source table
inputs.hr_case_sys_id, // Source sys_id
'sys_email', // Target table
inputs.email_sys_id // Target sys_id
);
The success 
value is always blank, and the attachments are not copied.

Attempt 3: Manually Writing to sys_email_attachment table using script action.
This approach also did not work.
Any guidance would be greatly appreciated.
Thanks in advance!

 

 

0 REPLIES 0