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
Brian11Brian11 

Allow only certain triggers to fire when using batch apex

Is it possible to fire only some triggers when you create a batch task?

I'm running into a problem where a batch task performs and because one of my triggers uses. It doesnt fire but I need that trigger to fire.

if(!System.isBatch()){
}
Raj VakatiRaj Vakati
You can do it in multiple way i guess .. 
  1. Using the System.isBatch 
  2. You can do it event with Global Statue full boolean variable  
https://salesforce.stackexchange.com/questions/29520/how-to-prevent-a-trigger-firing-during-a-batch-job