+ Start a Discussion
Chris ShadeChris Shade 

How to get a batch to start one trigger/workflow/process

I have an external source writing batches of variable sizes but up to 200 tasks into SalesForce.  Each time it writes I want to start a single trigger/workflow/flow (I'm flexiable). 

The each of the tasks meet my criteria and each is starting its own apex triggers and I hit limits.

Any ideas how I can get around this?
Mathew Andresen 5Mathew Andresen 5
If the criteria are met any and all triggers will fire, moreover, I don't believe you can control the order the triggers will fire.

One solution is to have only one trigger per object, and then use that trigger to fire other classes to do all the execution.  And of course make sure your code is bulkified  if it isn't already  https://developer.salesforce.com/trailhead/apex_triggers/apex_triggers_bulk