-
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
Document Generation in Salesforce with Nintex DocGen
Nintex is powerful document generation tool comes with how to generate a document for data and also manage them. Salesforce is World No.1 CRM so…
Get Selected Records from ListView in Visualforce Page | GETRECORDIDS JavaScript | StandardSetController Salesforce
In this article, you will learn to use GETRECORDIDS function to get selected records IDs in Visualforce page. Requirement - Convert onclick JavaScript on custom…
Salesforce Cloud Platform
Old business management systems are fading due to their firm consistency on conventional approaches and manual efforts. Due to constant failures experienced, there is an…
Popular Salesforce Videos
Which Certification Is Needed In Salesforce for Getting Job?
Want to get a job in the Salesforce industry? Wondering which certifications are going to help. Join this useful group for Salesforce job & career…
Relationships in Salesforce | Why Relationships are Created?
In this video, Salesforce Rangers goes into detail about what relationships are in Salesforce and why they are necessary in the first place. This is…
Salesforce Development and Career Opportunities
Salesforce is the world’s #1 customer relationship management (CRM) platform. Salesforce allows sales reps to see everything about a customer in one place and provide…