function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kristiana GrangerKristiana Granger 

A developer writes a SOQL query to find child records for a specific parent. How many levels can be returned in a single query?

Best Answer chosen by Kristiana Granger

Hi Priti ,

It should be 1 , So option is A

All Answers


Hi Priti ,

It should be 1 , So option is A

This was selected as the best answer
Kristiana GrangerKristiana Granger
thanks jaiswal
So parent to child only 1.
but child to parent we can go 5 level depth right?

but here quetion is we need to find child record corrosponding to parent...  so we write query on child record right.
Can u please explain little more about this. for me quetion seems confusing (as this is PD1 que) 

Hi Priti, 

Yes, we can write the SOQL in both the ways(on the child as well as on parent). But if we write the query child by using where clause then we will not be using any level. Since this question is about level, that's why you need to query on parent and get the child. 

Querying on child/parent depends on your business logic. 

Hope, this explanation might help you.

Social HouseSocial House
Hello Priti,
Do you have more question for practice of PD1 exam?
please provide me