You need to sign in to do that
Don't have an account?
Autobat
Visualforce Controller Constructor Unable to Fire @future?
Hey Guys,
So I have created a heap of code that works perfectly if the entry point to my class is executed from an SControl using the old sforce.apex.execute(…) method and a web service. Now the web service that fires basically tees up an Argument and Return object and then fires the entry point in one of my campaign automation classes.
Now here comes the interesting bit, and by interesting I swore very loudly!
If I move that web service code into the constructor of my Visualforce controller all of the code runs perfectly apart from none of the future methods are queued up and therefore not run…….. The code (confirmed by System Debug messages) just jumps over the call to the @future, the two log files look near identical with the only difference being what process inits everything.
Any ideas? I really don’t want to execute this code from an SControl.
So I have created a heap of code that works perfectly if the entry point to my class is executed from an SControl using the old sforce.apex.execute(…) method and a web service. Now the web service that fires basically tees up an Argument and Return object and then fires the entry point in one of my campaign automation classes.
Now here comes the interesting bit, and by interesting I swore very loudly!
If I move that web service code into the constructor of my Visualforce controller all of the code runs perfectly apart from none of the future methods are queued up and therefore not run…….. The code (confirmed by System Debug messages) just jumps over the call to the @future, the two log files look near identical with the only difference being what process inits everything.
Any ideas? I really don’t want to execute this code from an SControl.
Many thanks Doug