-
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
Introduction of Leaflet Map in Salesforce Lightning Component
The Leaflet is an open-source JavaScript library that is used for mobile-friendly interactive maps. It has all the mapping features. It works very well across…
Salesforce Configuration Vs Salesforce Customization and Their Best Practices
What Is Configuration In Salesforce? Salesforce design is everything you can do inside the CRM framework. This implies you can add another field to your…
How To Process Large Records in Salesforce Without Hitting the Governor Limits
Batch Classes: - Batch Apex is exposed as an interface that must be implemented by the Salesforce developer. Batch jobs can be programmatically invoked at…
Popular Salesforce Videos
Salesforce for Manufacturing: How to Digitize Your Sales Processes
As a manufacturing sales leader, you’re looking for ways to go digital with your sales processes and improve channel performance. In this video, you’ll learn…
What are the Objects in Salesforce?
What is the difference between Profile Vs Permission Set? Salesforce Interview Questions and Answers by CRS Info Solutions. Watch this video to learn more. Read…
Customer Lifecycle Analytics | Salesforce
Customer Lifecycle Analytics, built on Tableau CRM, helps you glean even more value from your Salesforce Surveys and Salesforce Feedback Management responses with embedded analytics…