I am receiving an error message when trying to test a class that implements Schedulable.
System.CalloutException: Callout from scheduled Apex not supported.
People have suggested using the @future
method, but I am worried about my application being out of sync. I am using a callout to synchronize a Salesforce object to another system and then update the Salesforce object with the ID from the other system. My though is that the @future
method may prevent that from happening in a linear fashion (SOQL to get sObject, Callout to create and get the ID from other system, Update sObject with ID).
I have looked at using a Database.Batchable
interface but am a bit lost. All I need the batch to do is the following.
bigClass sync = new bigClass();
sync.init();
Batchable's execute method appears to require a List. Is there any way to have it just run the init method?