You need to sign in to do that
Don't have an account?
Smita Hodiggeri
How to Get all the email messages for all the opportunities of particular record type? SOQL?
Hi Community,
I am looking to figure out how do I get a list of all the email messages for the all oppotunities of particualr record type?
Any thoughts are much appreciated.
Many thanks,
Smita
I am looking to figure out how do I get a list of all the email messages for the all oppotunities of particualr record type?
Any thoughts are much appreciated.
Many thanks,
Smita
FROM EmailMessage
WHERE RelatedToId IN (
SELECT Id
FROM Opportunity
WHERE RecordTypeId = '<your_record_type_id>'
)
We Provide Salesforce Interview and Work Support.
Interested People DM. (SalesfoceInterview4uBuddy@gmail.com)
All Answers
Hi Smita,
You can try this query:
SELECT Id, Subject, ToAddress, FromAddress, TextBody, HtmlBody, ParentId FROM EmailMessage WHERE ParentId IN (SELECT Id FROM Opportunity WHERE RecordTypeId = '<record type id>' )
Mark this as best answer if this helps
Thanks
FROM EmailMessage
WHERE RelatedToId IN (
SELECT Id
FROM Opportunity
WHERE RecordTypeId = '<your_record_type_id>'
)
We Provide Salesforce Interview and Work Support.
Interested People DM. (SalesfoceInterview4uBuddy@gmail.com)