You need to sign in to do that
Don't have an account?
PERFECTIONIST
SOQL: Parent to Child and Child to sub child relationship
Dear All,
Here i am posting a challenging question for all salesforce developers.
Can we fetch Data from Parent to child and child to sub child, sub child to child?
Let me explain you bit more:
have Parent table A and child is B
B having relation ship with C
C having relation ship with D
Now my question is i need to get data of A + B + C+ D by using SOQL query
Note: we need to get data by writing SOQL Query only not in using apex list or map
Highly apreciable your valueble answers
Thanks,
Here i am posting a challenging question for all salesforce developers.
Can we fetch Data from Parent to child and child to sub child, sub child to child?
Let me explain you bit more:
have Parent table A and child is B
B having relation ship with C
C having relation ship with D
Now my question is i need to get data of A + B + C+ D by using SOQL query
Note: we need to get data by writing SOQL Query only not in using apex list or map
Highly apreciable your valueble answers
Thanks,
If you are talking about retrieving values from all these different objects within one SOQL then that is not possible. But you can use different SOQLs to pull data.
Like if you run the following SOQL then you will receive an error stating "SOQL statements cannot query aggregate relationships more than 1 level away from the root entity object.".
Therefore you need to break down the SOQL and then run it.
Thanks
AR
If you found the reply useful that solves your problem then please mark it as best answer.