Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

The SOAP API seems to expose the EmailMessage sobject which would allow for downloading details of emails sent through Salesforce.

I do not seem to be able to access this based on the sobject data returned by the REST API.

Any idea if this is likely to be included in the REST API?

What are my options?

Would SOAP be the only way to access it?

share|improve this question
    
Could you create a custom REST endpoint in Apex and deliver it that way? –  joshbirk Jan 31 '13 at 16:50
    
This is for a plugin for an open-source email client designed to be used by any user with API access (not just a specific organisation) so would that be an option? –  leighman Feb 2 '13 at 22:00
    
Any user with API access should be able to access an Apex REST endpoint. Only if the org didn't support Apex, basically, would I think there would be a problem. –  joshbirk Feb 6 '13 at 18:56

2 Answers 2

up vote 2 down vote accepted

EmailMessage is in fact not accessible over the SOAP API either.

Emails via Salesforce are stored in the Task object so you can select from that where Subject begins with "Email: ". Other Email information is stored within the Description.

share|improve this answer
    
Emails are stored in the Task object. To save an email you simply use the type = Email. The whoId is the contactId. –  erbdex Aug 12 '13 at 11:15

Yes it does seem that there is a difference here, that does surprise me as well to be honest. I did a test using the Salesforce Workbench and it was not listed in the global describe, editing the URL directly confirmed things.

enter image description here

The standard docs for this object do indicate that the usual array of CRUD operations are supported and I cannot find any stated exclusion for the REST API. So yes I would say the traditional SOAP Partner/Enterprise API's are your next best route.

create(), delete(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), undelete(), update()

share|improve this answer
2  
I can confirm that EmailMessage is not available via the REST API in the current release. We are looking at supporting it in a future release. –  metadaddy Feb 7 '13 at 6:33
    
Any idea on a timeline? Should it be available over the SOAP API as per salesforce.com/us/developer/docs/api/Content/… ? –  leighman Feb 8 '13 at 17:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.