function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
soofsoof 

System.AsyncException: Failed to enqueue future method

I'm trying to execute the simplest of codes in a future method, but when I call the method, it fails with the following exception:

System.AsyncException: Failed to enqueue future method

 

Here's my code:

 

global class OpptyEmailNotificationUtil {

@future public static void sendEmails1() {

System.debug('test');

}

}

 

I actually want to do a lot of other stuff in the future method, but am unable to even get this simple code to work.  Can anyone help?

 

Thanks. 

 

Best Answer chosen by Admin (Salesforce Developers) 
ShamSham

Check if you have an option

Setup > Administration Setup > Monitoring > Apex Jobs.

 

If not, you need to contact the customer support to get @future activated.

All Answers

soofsoof

Is there a particular configuration that I need to do to the org settings?  Does the user need a special permission to execute a future method?  I'm trying via a user with System Admin profile.

 

Thanks. 

ShamSham

Check if you have an option

Setup > Administration Setup > Monitoring > Apex Jobs.

 

If not, you need to contact the customer support to get @future activated.

This was selected as the best answer
CTCT_ChangCTCT_Chang
You mention @future has to be activated.  Does it have to be activated for our package account the same way Apex had to be activated, or does it have to be activated by each of our customers who are trying to use our application in a professional edition org?
Message Edited by CTCT_Chang on 09-08-2009 07:54 AM
Message Edited by CTCT_Chang on 09-08-2009 07:54 AM