function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Amitkumar15Amitkumar15 

EmailMessages SOQL

How to write soql for retrieving records from EmailMessages.

 

I am using:

 

List<EmailMessages> emailMessage = [Select Id, ParentId, ActivityId,TextBody, HtmlBody, Headers, Subject, FromName, FromAddress, ToAddress, CcAddress, BccAddress, Incoming, HasAttachment, Status, MessageDate, IsDeleted, ReplyToEmailMessageId From EmailMessages where Status = '3' and ActivityId in :activityId];

 

 

Error : sObject type EmailMessages is not supported...

 

Any help on this please?

sandeep@Salesforcesandeep@Salesforce

Unfortunaltely we can not write SOQL on emailMesage object direclty I think API name should be anything else let me search becaue we can apply query call on this object ( suggested by Salesforce)

Amitkumar15Amitkumar15

Thanks Sandeep.

 

Waiting for your response.