function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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