cross object nested soql queries in salesforce -- w3web.net

How to write a Cross-object (Nested Queries) SOQL query from Parent to child, Retrieve the related list values and display on Lightning Component in Salesforce | how to access child records from parent in salesforce

Hey guys, today in this post we are going to learn about How to write a Cross-object (Nested Queries) SOQL query from Parent to child, Retrieve the related list data and display on Lightning Component in Salesforce

Files we used in this post example

relationshipQueriesCmp.cmp Lightning Component It is used for create a table for display the Related List Values
relationshipQueriesCmpController.js JavaScript Controller File It is hold Javascript doInit functionality.
relationshipQueriesCmpHelper.js JavaScript Controller Helper File It is hold for Javascript Helper Function to get Nested Queries Values from apex method
relationshipQueriesCtrl.apxc Apex Class Controller It is used for get SOQL query from Parent to child and Retrieve the related list data from Apex Method

Live Demo

cross object nested soql queries in salesforce -- w3web.net

Other related post that would you like to learn in lightning component.

Create Lightning Component

Step 1:- Create Lightning Component : relationshipQueriesCmp.cmp

From Developer Console >> File >> New >> Lightning Component

relationshipQueriesCmp.cmp [Lightning Component File]

Create Component JavaScript Controller

Step 2:- Create Lightning Component : relationshipQueriesCmpController.js

From Developer Console >> File >> New >> Lightning Component >> JavaScript Controller

relationshipQueriesCmpController.js [JavaScript Controller]

Create Component JavaScript Helper

Step 3:- Create Lightning Component : relationshipQueriesCmpHelper.js

From Developer Console >> File >> New >> Lightning Component >> JavaScript Helper

relationshipQueriesCmpHelper.js [JavaScript Helper File]

Create Apex Class Controller

Step 4:- Create Apex Class : relationshipQueriesCtrl.apxc

From Developer Console >> File >> New >> Apex Class

relationshipQueriesCtrl.apxc [Apex Class Controller]

cross object nested soql queries in salesforce -- w3web.net

Further post that would you like to learn in lightning component.

Hi, This is Vijay behind the admin and founder of w3web.net. I am a senior software developer and working in MNC company from more than 8 years. I am great fan of technology, configuration, customization & development. Apart of this, I love to write about Blogging in spare time, Working on Mobile & Web application development, Salesforce lightning, Salesforce LWC and Salesforce Integration development in full time.

2 thoughts on “How to write a Cross-object (Nested Queries) SOQL query from Parent to child, Retrieve the related list values and display on Lightning Component in Salesforce | how to access child records from parent in salesforce”

Leave a Comment