+ Start a Discussion
PbondalapatiPbondalapati 

3 level objects in vf pages

I need to select mulple child objects for Parent object and and muliple child objects for child objects in single vf pages 

 

a isparent of b and b is parent of c

 

Iwant to select multiple bs for a and multiple c's for b's . cansome one please help me 

Karthikeyan JayabalKarthikeyan Jayabal

This is not possible using a single SOQL statement as "SOQL statements cannot query aggregate relationships more than 1 level away from the root entity object." This is the error message thrown by SF, if you write a query like:

 

SELECT Id, (SELECT Id, (SELECT Id from C__r) FROM B__r) FROM A

 So, the only way is to spilt it into two steps: 1. Query A & B first, then 2. Then, use B Ids to query all Cs.

PbondalapatiPbondalapati

I need help in vf pages

  1. Code i will try in different directions . i need help in how manage in user interface