Support Article
Error occurs when sending email with attachments
SA-79242
Summary
Pega Platform 8.1. 1 is updated to Pega Platform 8.2.1.
During testing, unable to send emails with workobject attachments. Additionally, the Send Email works without attachments.
Error Messages
Cannot open or save instances of class Data-EmailAttachments
Steps to Reproduce
Unknown
Root Cause
The SendEmailWith*Attachments activity is to send an email with the Case attachments. If the attachment is not associated with a case, then the attachment's information must be specified by custom pages or parameters.
The 'ReferencePage' parameter is an optional parameter to inform the API to which case the case attachments belong to. If the attachment is not associated with a case, then the attachment's information must be specified by custom pages or parameters.
After refactoring the code in Pega Platform 8.2, when the ReferencePage is present or set with some data, then that work object is attempted to be opened. When the ReferencePage is set with the AttchmentPage as a reference, the application attempted to open the 'Data-EmailAttachments' page which is not present but is populated with the stream data. As a result, the error occurs.
Resolution
Perform the following local-change:
Use the SendEmailNotification with AttachmentPage parameter set (instead of SendEmailWith*Attachments).
Published August 15, 2019 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.