You need to sign in to do that
Don't have an account?
Adam Hayden 6
Pulling extra information from an Email-to-Case Email.
Hi I wonder if anyone can help me.
I'm just starting out as a salesforce developer and I've been asked to make it so that when an Email-to-case email creates a new case, additional information is pulled from the body of the email and populates given fields of the case.
I decided to trying creating a Trigger Helper in APEX, to try to look for a prefix I know will be before each record in the email. I then want to extract the record information and pass it to the case. I havn't been able to find a whole lot about doing this on the internet and i'm wondering if i'm barking up the wrong tree?
I'm not really sure about how to interrogate the email that is related to the case in question, as the trigger I was writing will sit on the Case object how do I pull the Email body from the related email? I was assuming If I used an InsertAfterUpdate on the trigger, the case would exist with the related email saved for me to then read the body of and find the variables I needed.
Anyone with any advice, no matter how general is greatly appriciated. As I say, i'm just starting out so anything anyone can offer is hugely appriciated.
Many thanks,
Adam Hayden
I'm just starting out as a salesforce developer and I've been asked to make it so that when an Email-to-case email creates a new case, additional information is pulled from the body of the email and populates given fields of the case.
I decided to trying creating a Trigger Helper in APEX, to try to look for a prefix I know will be before each record in the email. I then want to extract the record information and pass it to the case. I havn't been able to find a whole lot about doing this on the internet and i'm wondering if i'm barking up the wrong tree?
I'm not really sure about how to interrogate the email that is related to the case in question, as the trigger I was writing will sit on the Case object how do I pull the Email body from the related email? I was assuming If I used an InsertAfterUpdate on the trigger, the case would exist with the related email saved for me to then read the body of and find the variables I needed.
Anyone with any advice, no matter how general is greatly appriciated. As I say, i'm just starting out so anything anyone can offer is hugely appriciated.
Many thanks,
Adam Hayden
You can see more about the data in the EmailMessage object here:
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_emailmessage.htm