function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Email-To-Case Attachment

How to save email attachment in Email-To-Case using EmailAgent ?
Does anyone can help me?

Not exactly sure what you are asking here. By default, if an email has an attachment, it is associated to the email that came in. It is not associated to the Case directly, but to the email. I believe someone wrote an AppExchange app to automatically store attachments from Emails on the parent case instead. The problem with that approach is that you can't forward the email with the attachment without saving the attachment to your desktop and reattaching it to the email.

The app was very easy and free of cost, incase if any one cant go for an app, try the below work around


Go for a case after insert trigger


inside the trigger retrieve all the Case Ids and pass them to a future handler method , where you will retrieve all the Email Messages(Child to Case) . Incase if any of them have a attachment copy them onto Case with ParentId as CaseId.