You need to sign in to do that
Don't have an account?
Maheshh Patel
Need to query all the Account records which are part of Account Hierarchy?
Hi All,
Please suggest on how to queryall the Account records which are part of the AccountHierarchy(Parent<-Parent<-Parent->Child->Child->Child Relationship).
Thanks for the Info,
Mahesh Patel
Please suggest on how to queryall the Account records which are part of the AccountHierarchy(Parent<-Parent<-Parent->Child->Child->Child Relationship).
Thanks for the Info,
Mahesh Patel
If you have a small set of Accounts or you can add some other filter criteria, you can query all the Accounts and then use a recursive method to create a hirarchy.
Or
you can also use this query: to fetch parents till 5 level to get parents upto 5 level above. Have not tried this query, but it should work.
More reference :
- http://salesforce.stackexchange.com/questions/14445/account-hierarchy-with-variable-levels-of-parents
- http://salesforce.stackexchange.com/questions/105056/account-hierarchy-trigger-update-all-accounts-in-hierarchy (http://salesforce.stackexchange.com/questions/14445/account-hierarchy-with-variable-levels-of-parents)
Please mark this as the best answer if this helps