You need to sign in to do that
Don't have an account?
bohemianguy100
account hierarchy soql
What is the soql statement used to generate the account hierarchy view? For example, I'd like to run a soql statement that traverses forward and backward to return a resultset of the entire account hierarchy for the account...i.e the child accounts and the parent acount and potentially, the parent of the parent, etc., because the hierarchy can be 3 or 4 levels deep.
How would I construct a soql statement to return the entire account hierarchy view?
Thanks.
Search for "inline account hierarchy" on the AppExchange. Force.com Labs released this free app which allows you to display the account hierarchy on a page. You can review their logic to see how they traversed the tree.