+ Start a Discussion
@ M  Coder@ M Coder 

SOQL on Open Activities

How to write a soql query to get All the records in Open Activites which are related list to a account.

User-added image 

 
RituSharmaRituSharma
Activities are technically split into tasks and events.You may use a query like below:

Select Id,(Select id,Subject from Tasks),(Select Id,Subject from Events) from Account where Id='0017F00002bJiMU'
RituSharmaRituSharma
Did the query that I shared work for you? If yes, please mark my answer as the best answer so that it's helpful for others too. Thanks!
@ M  Coder@ M Coder
Thanks Ritu for helping me out