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

How to find "Ultimate Parent" or "Top Level Account" in Account hierarchy?
Our organizations with work multi-level hierarchies of Account.
I was wondering if anyone knows how one can create a script Or SOQL to find out the "Ultimate Parent" and store the result in a field.
Thanks
I was wondering if anyone knows how one can create a script Or SOQL to find out the "Ultimate Parent" and store the result in a field.
Thanks
Try using this utility method which returns ultimate parent account for any given account id
Regards
Lokesh
All Answers
How many level you may have ? Where you want this to implement in trigger or in class ?
Try using this utility method which returns ultimate parent account for any given account id
Regards
Lokesh