You need to sign in to do that
Don't have an account?
Michael Rotter
how to have more than one future method in a single class
I currently have a class with two fututre classes that has no compiler errors, but when I run it through the execute anonymous window I get the error that "only the top level class can be static". How can I have two static methods in the same class without having the static error?
Try something of the form:
<pre>
public class MyClass {
@future
public static void myFirstFutureMethod() {
// do something here
}
@future
public static void mySecondFutureMethod() {
// do something here
}
}
</pre>
These will be called using the syntax:
MyClass.myFirstFutureMethod();