+ 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.