+ Start a Discussion
Gaurav GulanjkarGaurav Gulanjkar 

EmailMessage Trigger

Hi All,

In my org we have setup emailtocase feature to register the cases.As this feature does no assign contacts to the case if it is not found in contact table.I want to search the email body of the cases email to see if any email address is mentioned in the body of the email and search that email address in the contacts and assign that contact to the case.How should i approach to this.If any sample code available for reference would be great.

I have a before,after trigger on EmailMessage object.I want to avoid using Email Services feature.
Sagar PareekSagar Pareek
In your trigger try to check for email using HtmlBody field of EmailMessage Object.
Gaurav GulanjkarGaurav Gulanjkar
Sagar can you share give refrence code.