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

Query sent emails


I need some help, i need to query select all the emails sent related to an opportunity, i need to do that using the task object (if yes, where i can get the for: to: subject field) or i need to use the emailmessage object (if is correct why i don't get records, the object is empty)

I'll really appreciate your help
Query the Task object where TaskSubtype = 'Email' and WhatId='opportunity id'