You need to sign in to do that
Don't have an account?
Gaurav Suryawanshi
Retrieving the Account Parent Child hierarchy
Hello Everyone, I am new Here
I would like to retrive a parent child hierarchy.
I have 4 accounts.
Account1
|_____>Account 2
|_____>Account 3
|_______>Account 4
I want to retrive this parent child hierarchy by using query.
How to do??
Thanks in advance
I would like to retrive a parent child hierarchy.
I have 4 accounts.
Account1
|_____>Account 2
|_____>Account 3
|_______>Account 4
I want to retrive this parent child hierarchy by using query.
How to do??
Thanks in advance
May I request you please check the Salesforce documentation on
"SOQL Relationship Queries".
https://developer.salesforce.com/blogs/developer-relations/2013/05/basic-soql-relationship-queries.html
Basic Examples of SOQL RELATIONSHIPS:
Child > Parent (Standard Object)
Child >Parent(Custom Object)
Parent >Child(Standard object)
Parent >Child (Custom Object)
I hope it will be helpful.
Best Regards
RahulKumar
All Answers
May I request you please check the Salesforce documentation on
"SOQL Relationship Queries".
https://developer.salesforce.com/blogs/developer-relations/2013/05/basic-soql-relationship-queries.html
Basic Examples of SOQL RELATIONSHIPS:
Child > Parent (Standard Object)
Child >Parent(Custom Object)
Parent >Child(Standard object)
Parent >Child (Custom Object)
I hope it will be helpful.
Best Regards
RahulKumar
Let us know if this will help you
Lets say you have the id of the first account ,then use the below code to get all the four associated account records Let me know if you need further help.
Thanks and Regards,
Shiva RV