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
Meghen saiMeghen sai 

I want to get Event and Tasks from Accounts,Leads using a single query. How Can I do that

I want to get Event and Tasks from Accounts,Leads using a single query. How Can I do that [By Default if query for Event I will get events from Account and Leads, my convern is to get even and tasks together using single soql]
Boss CoffeeBoss Coffee
The following is an example query of how to get Events and Tasks belonging to Accounts.
SELECT Id, Name,
(SELECT Id, Subject FROM Events),
(Select Id, Subject FROM Tasks)
FROM Account