You need to sign in to do that
Don't have an account?
Fetching Email sender address in the Case Trigger
On Behalf of my colleague:
I'm writing a trigger in the Case
There is a Case created with Email-to-Case. Email is present as the Related list. There is a column in the email related list which shows the sender address of the Email (Email Address in the Image).

How to get that particular sender's address in the Trigger.
FYI. I could not find any Email related field (that forms the lookup relationship) in the Case
I'm writing a trigger in the Case
There is a Case created with Email-to-Case. Email is present as the Related list. There is a column in the email related list which shows the sender address of the Email (Email Address in the Image).
How to get that particular sender's address in the Trigger.
FYI. I could not find any Email related field (that forms the lookup relationship) in the Case
list<EmailMessage> = [SELECT Id, FromAddress, FromName, ToAddress, MessageDate
FROM EmailMessage
WHERE parentID = :caseId];
should do the trick.