3

I would like know if there is any global variable i can use to prevent trigger fire from a future method.

Like I can use

System.isBatch() 

to prevent trigger fire from batch classes

6

System.isFuture will do what you're looking for. You can also use the System class to determine if you're running in a scheduled context, batchable context, or queueable context.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.