Multiple Attachments in Email

  • 24 November 2016
  • 2 replies
  • 18 views

Badge +1

Hi,

 

Can multiple file attachments in K2 notification email for SmartActions? Attachment file will be stored in SQL database. The number of files will be dynamic and different for different request form.

 

The idea is to allow approver to approve or reject without logging in the K2 smartforms and email should contain Form soft copy and Form's attachments (multiple). I found how to attach K2 SmartForms as part of the email (http://help.k2.com/onlinehelp/k2smartforms/userguide/1.0.4/webframe.html#pdf_control.html).

 

 


2 replies

Badge +5

Yes, you can attach multiple files in a K2 Task notification e-mail message. If the attachments are stored in a SQL database table, the first thing you will need to do is create, or generate a SmartObject that points to that table if you haven't already. Just an FYI, when creating a SmartObject with K2 SmartBox and creating a File column, K2 uses the nvarchar(max) field type in SQL Server to store the contents of your file.

 

Once you have your SmartObject ready to go, configure your Client Event notification message by using the File field from your database table. In my example below, I have a field designated to hold a file, named "File". I am also using K2 Studio for the workflow designer, but it works similarly in K2 for SharePoint as well, if you have SQL Server SmartObjects available.

 

1. When configuring the Attachments box for your notification message locate your SmartObject pointing to your SQL table.

2. Use a "Get List" based method to return a list of files from the database. 

3. Select the File column so that it goes into the Attachments box.

 

     15910i60CEB3D01B1B5802.png

 

Hope this helps!

 

Jason

 

 

Badge +8

If using Designer to build this process and it has a workflow the method would be as follows:

 

In the email configuration open Context Browser.

 

14771iA453421370ACE098.png

 

Thanks,

Bryan Peters

 

Reply