HRSD - Employee Documents Table

latha15j
Tera Contributor

Can we attach Employee Document files as an attachment to the approval notification email?

2 ACCEPTED SOLUTIONS

Kieran Anson
Kilo Patron

You would need to duplicate the attachment onto the approval table for that to occur. Also, there are security concerns with sending employee documents which could contain sensitive data. 

 

It's best to provide a link to the document, so contextual security is applied 

View solution in original post

Community Alums
Not applicable

Hi @latha15j ,

What i would do is follow either of the below ways :

a. Send physical attachment

b. Send attachment download link in the mail.

 

However, as @Kieran Anson  mentioned it will have sensitive data , so it's be causious about the methods you will use to send the data.

It's better to send a link to download the attachment, to have a link in the notification we have to create an email script as follow and use it in the notification

Create Email script:

Name: add_attachment_link

Script: 

var attachmentSysId = 'a7cb84bf2f1630107f282aa62799b6ae'; // get sys_id your attachment from sys_attachment table
var nameOfAttachment = 'Click here to download'; //Name on link
var link = "<a href = /sys_attachment.do?sys_id=" + attachmentSysId + ">" + nameOfAttachment + "</a>" ;
template.print(link);

Once an email script is created open your notification and call mail script into it

Open the notification and write the below code at bottom of notification "Message HTML"

${mail_script:add_attachment_link}

 

Note: You can use your Employee document table where your attachments resides instead of using sys_attachment.

 

View solution in original post

2 REPLIES 2

Kieran Anson
Kilo Patron

You would need to duplicate the attachment onto the approval table for that to occur. Also, there are security concerns with sending employee documents which could contain sensitive data. 

 

It's best to provide a link to the document, so contextual security is applied 

Community Alums
Not applicable

Hi @latha15j ,

What i would do is follow either of the below ways :

a. Send physical attachment

b. Send attachment download link in the mail.

 

However, as @Kieran Anson  mentioned it will have sensitive data , so it's be causious about the methods you will use to send the data.

It's better to send a link to download the attachment, to have a link in the notification we have to create an email script as follow and use it in the notification

Create Email script:

Name: add_attachment_link

Script: 

var attachmentSysId = 'a7cb84bf2f1630107f282aa62799b6ae'; // get sys_id your attachment from sys_attachment table
var nameOfAttachment = 'Click here to download'; //Name on link
var link = "<a href = /sys_attachment.do?sys_id=" + attachmentSysId + ">" + nameOfAttachment + "</a>" ;
template.print(link);

Once an email script is created open your notification and call mail script into it

Open the notification and write the below code at bottom of notification "Message HTML"

${mail_script:add_attachment_link}

 

Note: You can use your Employee document table where your attachments resides instead of using sys_attachment.