You need to sign in to do that
Don't have an account?

Query from child records
hi
here i have 3 objects. A, B and C , here A is the parent to B and B is the parent to C.
now my requirement is to write query on A and then i want to get childs B and C records.
is it possible to query on a single query.
suggest me the solution.
thanks in advance,
Anji
here i have 3 objects. A, B and C , here A is the parent to B and B is the parent to C.
now my requirement is to write query on A and then i want to get childs B and C records.
is it possible to query on a single query.
suggest me the solution.
thanks in advance,
Anji
So if you query from top level object A like this,
It would raise following error.
> SOQL statements cannot query aggregate relationships more than 1 level away from the root entity object.
One possible solution is, querying from middle level object B like this,
I'm not sure if this can be used in your situation, but just for reference.