Hi,
I am using a smart service called "Export Data Store Entity to Excel" and generating a document and storing in a pv! variable.
Now, when I try to attach the same document in the "Send E-Mail" service, I am getting an error. I passed the variable to the "Attachments" like pv!reportName and tointeger(pv!reportName), but still no luck.
By looking into an error message I was unable to find the root cause.
Can someone advise please.
ERROR:
Problem: An error occurred in executing an Activity Class.
Details: Failed to process attachments
Recommended Action: Examine the activity class to correct the error and then resume.
Priority of this problem: High Priority
Discussion posts and replies are publicly visible
You are not saving the generated document correctly here, your pv!reportName will just have the name of document which you are passing in value.
The generated new document can be saved into a pv from Output tab from Results
Hi did setup in the Outputs tab too. But no luck. Could you check below attached screen shots please.
As I told you pv!reportname do not contain your generated document it just have a text for document name, use the pv!NewDocument in attachments for send E-mail service.
Thank you Sanchit. I got it.
Great help.
As a secondary thing, be careful when you use "now()" to append a value to the filename. "now()" when cast as text will create a date with slash and colon (":") characters in it - that will work (afaik) decently in Appian but will cause issues when anyone tries to download such a file since slashes are strictly disallowed in filenames in most PC filesystems.
My normal trick to handle this is to set the filename with a safe string like "ExcelExport - " & text(now(), "yyyy-mm-dd hh.mm.ss")"