You need to sign in to do that
Don't have an account?
Rbn
Account hierarchy Util
I wanted a utility class which will give me a list of all salesforce id’s in an Account Hierarchy.
I have an hierarchy of something like below and the hierarchy can span upto many levels in Account.
Capital World Investors (DEMO) – Ultimate PArent
Capital Research Global Investors (DEMO) – Parent
Fidelity Management & Research (DEMO) – Child
Capital Research Market Investors (DEMO) – Parent
Fidelity Management & Research & Analytics (DEMO) – Child
Thank you
I have an hierarchy of something like below and the hierarchy can span upto many levels in Account.
Capital World Investors (DEMO) – Ultimate PArent
Capital Research Global Investors (DEMO) – Parent
Fidelity Management & Research (DEMO) – Child
Capital Research Market Investors (DEMO) – Parent
Fidelity Management & Research & Analytics (DEMO) – Child
Thank you
Code Sample:
However, i have tried in my org and came up with another snippet, Let me know if you think any more enhancements can be done to this.
My Resultant output is something like this.
Let me know if it makes sense.
And thanks to you for giving me a initial headup on the code snippet. Appreciated!!!
Regards,
Rabin
Code: