+ 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?

A.1
B.7  
C.5
D.3
Best Answer chosen by Kristiana Granger
Snehil_JaiswalSnehil_Jaiswal

Hi Priti ,

It should be 1 , So option is A

All Answers

Snehil_JaiswalSnehil_Jaiswal

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) 
Snehil_JaiswalSnehil_Jaiswal

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