You need to sign in to do that
Don't have an account?
@future problem
Hi all,
I currently have a method which simply calls an @future method 10 times. The method that it calls updates the database and stops. The problem is that the first methods dataset doesn't appear to get updated when the @future method fails. I have tried adding a wait to the code by using:
while (iCount < 10) {
runFuture();
Double dMilliUntil = System.Now().millisecond() + 100;
while (System.Now().millisecond() <= dMilliUntil ) { } //Wait for 1 second
iCount++;
}
which waits for 1 second (which should be long enough for the future method to complete). Does anyone know why this doesn't update the original dataset?
Thanks
James
All Answers
In a word, you can hardly predict how the future call executes.