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
Niraj Kumar 9Niraj Kumar 9 

Soql query to get all task either account, opportunity, Contact

Hi guys,

I want to retrieve all task associated with account and related to contact, opportunity
Pankaj_GanwaniPankaj_Ganwani
Hi,

[select Id from Task where (What.Type IN ('Account','Opportunity') OR Who.Type='Contact')]
Srinivas SSrinivas S
Hi Niraj,

I have replyed for one of your similar question -
https://developer.salesforce.com/forums/?id=906F0000000MN5bIAG

Thanks,
Srinivas
- Please mark as solution if your problem is resolved.