AddThis Feed Button

Recent Items

Tags: Apex

I came across a thread about Dataload batch size and triggers in the Salesforce Developer Community.

Several people are reporting strange behaviour in their Triggers, such that a batch of 200 records actually calls the Trigger twice, but variables are not reset. Apparently it’s an intended behaviour and not a bug, but it’s not documented.

As a result, I’ve reduced all my batch sizes to 100 to avoid any potential problems. You might want to do the same.

The Bottom Line

  • Beware of Triggers with batches of over 100 records
  • The online Developer Community is great for finding answers to strange situations

One Response to “Beware Trigger batches over 100 records”

  1. Chirag Mehta Says:

    As said and discussed in blogs, Static Variables and Governor limits are not getting reinitialized.

    Did you receive any confirmation or reply from Salesforce.com on above point ?
    Any documentation @ Salesforce explaining this strange behavior ?