You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@future methods are great, but sometimes you want to call the method synchronously. Propose a convention whereby all future methods do nothing more than call another non-future method. Naming convention for future/non-future method pairs TBC.
e.g.
BAD
@futurepublicstaticvoidmyMethod(AccountmyAccount) {
// do a whole bunch of things with myAccount
}
GOOD
@futurepublicstaticvoidmyMethod_future(AccountmyAccount) {
myMethod(myAccount);
}
publicstaticvoidmyMethod(AccountmyAccount) {
// do a whole bunch of things with myAccount
}
The text was updated successfully, but these errors were encountered:
@futurepublicstaticvoidmyMethodAsync(List<ID> recordIds) {
// Query the sObject with the incoming parameter.myMethod(myAccount);
}
publicstaticvoidmyMethod(AccountmyAccount) {
// do a whole bunch of things with myAccount
}
@future
methods are great, but sometimes you want to call the method synchronously. Propose a convention whereby all future methods do nothing more than call another non-future method. Naming convention for future/non-future method pairs TBC.e.g.
BAD
GOOD
The text was updated successfully, but these errors were encountered: