Support Article
Attachments are not shown in email
SA-23504
Summary
When user opens emails(correspondence) with attachments from a case the email attachments are not shown.
User is sending the email using the Out-of-the-box (OOTB) activity @baseclass.SendEmailNotification and passing in an attachments page and then saving the email using the Out-of-the-box activity Work-.CorrAttach.
Error Messages
Not Applicable.
Steps to Reproduce
- Configure Outbound Email Server.
- Create flow to Send Correspondence email with attachments from Pega.
Root Cause
A defect in Pegasystems’ code or rules. Issue with configuration where comma separated values are missing (for example,File, Originating)
Resolution
Perform the following local-change:
It works when pyAttachmentCategories is included as one of the parameter for SendEmailNotification activity and comma separated values are passed, for example,-File, Originating.
However, user is selecting few of the attachments instead all in WO. When they view the Correspondence its shows all due to below logic in Show HTML.
for(int i=1; i <= AttachmentListPageList.size(); i++) // For each attachment on the Work Object
{
ClipboardPage cpAttachment = AttachmentListPageList.getPageValue(i); // Get the WO attachment's page
if(cpAttachment.getProperty("pyCategory").toString().equals(attachmentsInEmail[k])) // If it is found, add it to the list
{
tools.appendString("<a href=\"" + serverURL + "?pyActivity=Work-.GetAttachmentReference&linkInsHandle=" + cpAttachment.getProperty("pzInsKey")+"\" target=\"loader\">"
+ cpAttachment.getProperty("pyMemo").toString() + " (" + attachmentsInEmail[k] + ")</a><br />");
}
Published May 25, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.