Loop through the Accounts and in an inner, iterate over the OpenActivities.
for(Account a : lstactivity){ for(OpenActivity t : a.OpenActivities){ System.debug(t.Subject); } }
Regards, Satish Kumar Please mark my answer as a solution if it was helpful so it is available to others as a proper solution. If you felt I went above and beyond, please give me Kudos by clicking on the star icon.
for(Account a : lstactivity){
for(OpenActivity t : a.OpenActivities){
System.debug(t.Subject);
}
}
Regards,
Satish Kumar
Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.
Hope this helps.
Regards,
Satish Kumar
Thanks so much!