Search code examples
triggerssalesforceapex-code

How to run salesforce apex trigger on more than 200 records


I have written a trigger on account object of Salesforce (after insert, before update).

The problem is that when I update 1000 records by writing apex in apex executor, This trigger processes only 200 records.

How can I enable trigger to process more than 200 records?

Any help will be much appreciated.


Solution

  • The trigger is run on all records, but in chunks of 200, if you update 1000 records, you trigger will run 5 times with 5 different sets of 200 records.