I am getting the below exception when I am running batches in sequence. That is, I am calling another method to create next batch once the first batch is in it's finish method.

Database.executeBatch cannot be called from a batch start, batch execute, or future method.

I am sure we are using latest version of the Batchable interface.

Any help would be appreciated. Thanks in advance!


3 Answers 3


Most likely problem is the Salesforce API version that the Batchable class is set to. That needs to be >= 27 for the batch chaining from the finish method to work.


Hey It works only in API version 27. Change API version to 27. Will work for you. :)

  • Interesting. Do you have any proof/link to official docs about that? I have 1 batch starting out of finish() method of another and it works like a charm (API v 23)
    – eyescream
    Commented Aug 11, 2014 at 6:11

I have changed the version to 26 and it worked :) It was initially 25 fyi.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .