-
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
What Salesforce Einstein Chatbots Can Do? Use Cases Overview for Every Industry
You may have encountered AI chatbots in your lifetime, for leisure or business. Chatbots are not a new concept. Their current surge in popularity reflects…
Send Salesforce Data on Google Drive via WebMerge
Here in this blog, we are using Salesforce Record data to be saved to Google Drive via WebMerge Document. Please follow the below steps for…
Syna World Windbreaker: Where Streetwear Style Meets Everyday Performance
In modern fashion, outerwear has evolved beyond basic protection. Today, jackets and windbreakers represent personality, confidence, and lifestyle. The Syna World Windbreaker is a perfect…
Popular Salesforce Videos
Salesforce Anywhere: Technology Enabling the All-Digital, Work-From-Anywhere World
While companies, governments and organizations are slowly returning to their offices, the COVID-19 pandemic has changed the future of work forever. In fact, nearly 70…
Create Targeted Campaigns w/ Marketing Cloud Advertising | Salesforce Demo
Explore the power of using 1st party data to power ad audiences across the most popular ad channels today, including Google (Search, Shopping, YouTube, Gmail),…
Create Custom App in Salesforce | Salesforce Training
Following Pointers are included in this video: 00:00:00 Agenda 00:00:36 What is Cloud Computing? 00:03:12 What is Salesforce? 00:05:21 Benefits of Cloud computing & Salesforce…