Bulk Salesforce Triggers and Mass Update
PROBLEM
A Mass Update Results screen appears with the message: Mass Update Unsuccessful! The following errors occurred.
CAUSE
Apex CPU time limit exceeded
This is common when a trigger uses multiple FOR loops and Mass Update runs on a large amount of data. A workaround is to remove some of the FOR loops in the trigger and to try to map your data differently.
Insufficient access rights on object id
This error can occur when a trigger is not properly using a List. If the DML is called and triggers a secondary DML that modifies a parent record that is shared between two records being mass updated, only the initial DML triggers will work. The rest will show the error message.
DML or query limit reached
This error can occur when a trigger calls a DML, SOQL, or SOSL query in a FOR loop. Consider creating lists to replace some of these insides of the FOR loops.
Refer to the Salesforce documentation for more information on bulkification.