Feb 6, 2013

EmailMessage Status Values

https://www.crmscience.com/lab-coat-lessons


I was working with the EmailMessage Object last night and ran into a question I've spent time answering before. I was writing a SOQL query string to return EmailMessage records based on their Status.

This didn't work:

I knew the data type for the Status field was a picklist/string, so I looked at the results of this:

The results yielded numbers 0 through 4:

Here are the values and the Statuses they represent:
'0' = New
'1' = Read
'2' = Replied
'3' = Sent
'4' = Forwarded

The Spring '13 Release notes describe the ability to enable "Email Drafts and Approvals" (Page 63 of the PDF). Later, on page 189, there is a code sample that creates an outbound Draft; note the Status value of '5'.