3

Is there a way i can see all sent and received emails (related to a Case) in its "Activity History"

Email-to-Case shows everything in Email related list. "Activity History" only shows the sent emails.

Email-to-Salesforce seems impractical for this scenario.

From what i understand, "Activity History" is a readonly object, so i doubt i can mess around with it through some code (like create an "ActivityHistory" record for every received email).

Any suggestions? Is it possible?

2

ActivityHistory is nothing more than either a Task or an Event record with a closed status. You could write a trigger on EmailMessage and create a closed Task or an Event with the incoming email body.

1
  • Is there a sample code? – efirat Aug 7 '18 at 11:24
1

Thanks Bachovski ... so this is how i did it - while setting up a routing address for Email-to-Case, i checked the box of "Create task" with Status as "Complete". So any received email creates a closed task, and now it shows in ActivityHistory

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.