+ Start a Discussion

Trigger and Workflow Execution

I am using dataloader to update and insert 1000 records. How many times will trigger and workflow fire in overall process 
Suraj MakandarSuraj Makandar
Hi Payal,

It depends on your batch size, for ex if your batch size is 200 then:
A) Trigger will fire 5 times and each time it will process records in chunk of 200.
B) Workflow rule will fire for each record you insert i.e. 1000.

Hope this helps!

Note: Please mark it as best answer if the information is informative.

Just for the confirmation, does workflow fire individually for each record even if its bulk update. Then what if there are millions of recods. Won't it hit governor limit?
Rasmitha NimmagaddaRasmitha Nimmagadda
Hello PAYAL, 

 for the Trigger, it depends on how you write the logic, for example, if the trigger is not bulky it won't update all records in a single batch.

For workflow rule, it will update for each record but if there any logic in the trigger which triggers multiple time on the same case it may cause the time limit exception

For example: for example of your trying to update the parent record which is satisfying the criteria to update all child records which may give you the time limit exception.
If there any that kind of scenario if you have, try to update the load with the batch job 20 to 50. that it won't give you any time limit exception.

Thank you.