You need to sign in to do that
Don't have an account?
dawnzdy
How to work around SOQL queries limitation when bulk updating?
Hi,
We have a trigger activated after update of account manager on account. In the trigger, it queries the old manager and put it to remove list. So when we do a bulk update of AM using Apex data uploader, error will occur when the update records is more than 20. Then we can only do it 20 at a time.
I know there is a limitation of 20 SOQL queries trigger. But we do need to do the bulk update now and than. Do you have any solution to this?
Thanks!
You need to make sure your SOQL and DML logic is outside any trigger interation logic. Take a look at the following doc:
http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_patterns_bulk.htm
All Answers
You need to make sure your SOQL and DML logic is outside any trigger interation logic. Take a look at the following doc:
http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_patterns_bulk.htm