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
Rodelio SantosRodelio Santos 

Email2Case: How Capture the email to case TO: email address?

I have 3 emailtocase routing addresses.

Sample:
Email address: billing@abc.com
Emailservice address: delsudshduishadiuhaskjdbashdgashdjhgds@jhsbdsajhd.com

I would like to create a custom field Email_to_Case_id__c in case object which will capture the email2case email address (TO:) when a case is created thru email.. This is for the user to know to which email address they are sending thier concerns. Is it possible to achieve this thru field update? (an out of the box functionality?). 

Is it possible to capture also multiple email address?

Email_to_Case_id__c = billing@abc.com; inquiries@abc.com



Thanks,
Del
Gaurav GulanjkarGaurav Gulanjkar
Hi Rodelio,

You can write a trigger on EmailMessage object and update the field.

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_emailmessage.htm

Thanks,
Gaurav