[SalesForce] System.LimitException: Too many DML rows: 10001

A user is trying to update some records in Salesforce, he is getting this error:

OrderHistory: System.LimitException: Too many DML rows: 10001.

He added that he is not able to insert 100 records at a time in Salesforce.
I checked OrderHistory Apex Trigger code, took the SOQL query out of the for loop (that may be causing the governor limit hit), still no luck.
Please can someone suggest how can i get rid off this error?

Best Answer

Your error doesn't have to do with a SOQL query in a for loop (although you really don't want that either). Your error has to do with too many records being inserted or updated at once. It sounds like the trigger has not been properly bulkified. If you have a trigger that is trying to update that many rows, you should really look into turning it into batch apex.