You need to sign in to do that
Don't have an account?
ChickenOrBeef
How to update ALL sub accounts (sub accounts of sub accounts, etc)?
Hey everyone,
When a certain account field is updated, I need all the sub accounts to be updated to have that same value. And I'm not just talking about the immediate sub accounts, but the subs of those subs, the subs of those subs, and so on.
What is the simpliest way to query/update all those sub accounts?
Thanks!
-Greg
When a certain account field is updated, I need all the sub accounts to be updated to have that same value. And I'm not just talking about the immediate sub accounts, but the subs of those subs, the subs of those subs, and so on.
What is the simpliest way to query/update all those sub accounts?
Thanks!
-Greg
One of the commenters under that question you posted said that SOQL queries can go five levels deep, so I decided to just go with this, which should be good enough:
Does that look like a good idea? It seems to work.
Thanks!
-Greg
All Answers
http://salesforce.stackexchange.com/questions/14324/recursive-functions-apex
One of the commenters under that question you posted said that SOQL queries can go five levels deep, so I decided to just go with this, which should be good enough:
Does that look like a good idea? It seems to work.
Thanks!
-Greg