-
How to debug the child values in parent to child query using for loop?
List<Account> accs=[select id,name,Phone,
(select id,lastname,firstname,email
from contacts)
from account];for(Account aa:accs){
System.debug(aa.id);
System.debug(aa.name);
System.debug(aa.phone);
}
for(Contact con:accs.contacts){}
The first loop runs error free while the second loop throws up some error. I have the parent values in the first loop but i need the child values in it as well. Can anyone help?
Log In to reply.
Popular Salesforce Blogs
Where to Learn Salesforce Admin Training Online?
To start anything, maybe from scratch or to attain an advanced level of knowledge, it is important to know various resources that can help you…
Download and Installation of Ant Migration Tool | Salesforce Developer Guide
Introduction The Ant Migration Tool is a Java/Ant-based command-line utility for moving metadata between a local directory and a Salesforce org. Usage of Ant-migration Tool …
Popular Salesforce Videos
Dynamic Forms | Lightning Record Page | Salesforce
In Summer 20, Dynamic Forms adds the Field Section and Field components to App Builder, so admins can use App Builder to create their page…
The Story of Salesforce. How Marc Benioff Built The Best CRM
This video, How It Happened explains the story of how Salesforce went from a small startup in San Francisco to become the leading CRM provider.…
Pros & Cons of Lightning Component vs. 3rd party frameworks in Salesforce UI development
Nikita drops by to share his invaluable experience of using popular 3rd party frameworks in Salesforce. http://media.blubrry.com/salesforceway/audio.xmcdn.com/group42/M05/25/57/wKgJ81rXk6XjaZIAAU_I_KtprFM998.m4a