You need to sign in to do that
Don't have an account?
Chirag Mehta
Whats the Solution to Perform Update of 100+ Records in Apex
Scrolled down many of posts here in Community but couldnt find one solution on how to avoid 'Too many DML rows' error.
Probably am i missing some community link then pls help me to get to that solution.
I am looking to mass update all contacts attached to a account. I do fetch all contacts using inbound SOQL query which do handles bulk processing too.
Now when it comes to update all contacts of all accounts which came into trigger, I do create a array and send tht entire array to update call which exceeds the limit of 100.
Is there any querymore or .. any other approach to be used .. pls let me know in detail on how to handle 100+ updates in Apex Trigger.
Thanks in advance
The alternate solution to overcome this problem is to create a time based workflow and execute it after every hour and each time update or insert 100 rows.
:smileyhappy:
I do something like this:
Doesn't the context of trigger remains the same when u call the update statement again for 100-200 records. Its like from same trigger context you are updating 100+ record.
Just wanted to confirm whether this approach works or not !!
I just wanted to confirm!!
There is no problem as such for me as of now, Anyhow can you confirm on number whether it is thousand or hundred records in one go ? Isnt it 100 updates in a single shot !!
Message Edited by Chirag Mehta on 01-10-2009 10:52 PM