You need to sign in to do that
Don't have an account?
Dan Lord
If a trigger handler calls a static method, what happens when another of the same type of trigger fires before that method finishes execution?
All the samples I've seen of Apex trigger handlers have them calling static methods in a helper/service class. What happens when a second trigger of the same type (say after insert) on the same object happens before that static method has finished executing? Will the second trigger call that static method and take over its execution - changing records, variables, etc?
This reveals my ignorance, but I've tried to figure this out on my own (using Google, etc.) without success.
Help/guidance/explanation would be greatly appreciated.
This reveals my ignorance, but I've tried to figure this out on my own (using Google, etc.) without success.
Help/guidance/explanation would be greatly appreciated.
I did receive an answer from another forum where I posted this question. The short answer is, "any Apex code called by each trigger invocation has static variables that are scoped to the transaction." So, my worry was baseless.
All Answers
See order of execution here
Let me know if it helps
I did receive an answer from another forum where I posted this question. The short answer is, "any Apex code called by each trigger invocation has static variables that are scoped to the transaction." So, my worry was baseless.