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

Attachments to case

Is there a way to attach  Files which are attached in inbound emails  to the case record using Email to case process.Can any one help me out.




There is no "simple" way of doing this (e.g. using standard SF configuration).


However, you can achieve this by writing an Apex trigger. I'm sure there are several ways of doing this but we did the following.


We've created an after insert trigger on Attachment where we check if the newly inserted attachment's parent is an EmailMessage. If it is, we create a new Attachment with the same values but set the parentId to the case instead of the EmailMessage. The new Attachment is then then added to a List of Attachments.


Once all newly inserted Attachments have been created we insert them.


Hope this helps.


/Søren Nødskov Hansen

jaya sai prasadjaya sai prasad

If you want to send attachments through mail ,check this native salesforce application MassMailer Docs.

MassMailer DOCS let’s you send mass email attachments to your leads or contacts while securely storing your files with Rackspace Cloud Files.

You can try this app by installing from appexchange  -Massmailer Docs.

You can learn more details about the product on this website -