List<User> users = [SELECT Name, (SELECT id FROM Applications__r) FROM User];
for (User u : users) {
// do something with it...
u.Applications__r.size();
}
See related https://salesforce.stackexchange.com/questions/36690/soql-count-number-of-child-records
If this information helps, please mark the answer as best. Thank you
List<Account> acc = [SELECT Name, (SELECT id FROM Contacts__r) FROM Account];
for (Account a : acc) {
system.debug('Total contacts :- '+a.Contacts__r.size());
}
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
You can try something like See related https://salesforce.stackexchange.com/questions/36690/soql-count-number-of-child-records
If this information helps, please mark the answer as best. Thank you
Please follow below code
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh