You need to sign in to do that
Don't have an account?
Aslam_Kamal_86
Change of owner of related records.
hi,
We have a requirement, where we need to change the owner of all the related objects, when the owner of that account is changed.
We developed a trigger to do this, however it so happenes that sometimes several hundreds (or thousands) of accounts needs to updated at once. When this happens, it throws a "Too many SOQL" exception.
We thus thought of using future classes for achieveing the same. Could anyone tell how reliable it is and how it would perform when a bulk of thousand records come for updation?
Thanks in advance..
werewolf
Indeed, @future would be the right way to do this. Be sure to do as many queries and updates in bulk as you can though -- even @future methods have limits. @future methods perform just fine, usually completing quite quickly after invocation.