You need to sign in to do that
Don't have an account?
GoForceGo
@future execution
Given that @future execute async, I suspect there are not guarnantees, but I thought I would ask:
I am in a before insert trigger and I call @future.
Is there any guarantee that my insert trigger (the current transaction thread) will complete before the async. method is called.
The current transaction thread will always complete before the async method is started.
It's like this because if we hit an exception in the synchronous thread, we need to rollback all of the activity of the thread prior to that, which includes placing @future methods on the queue.
All Answers
The current transaction thread will always complete before the async method is started.
It's like this because if we hit an exception in the synchronous thread, we need to rollback all of the activity of the thread prior to that, which includes placing @future methods on the queue.
Okay thanks. Makes sense. Good to know you can count on it.