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
Soundhariyaa MSoundhariyaa M 

System.LimitException: Too many future calls: 1 in batch classes

Hi All,

I have two batch classes and both classes call a future method in case of any exception occurs and other than that, both the batch classes don't call any future class.

But when I run a batch class I get this exception System.LimitException: Too many future calls: 1 but the other batch runs successfully without throwing any exception.

Log of batch class which causes an exception is :[ Number of future calls: 0 out of 0 ]

User-added imageLog of batch class that executes successfully : [ Number of future calls: 0 out of 50 ] 

User-added image
Both batches calls same future method but one batch shows "Number of future calls: 0 out of 0" and causes exception but another batch runs successfully with "Number of future calls: 0 out of 50"..

 

Could anyone help me figure what the issue, actually is ...

Thanks in Advance!!

SwethaSwetha (Salesforce Developers) 
HI Soundhariyaa,
Recommend reviewing 
https://salesforce.stackexchange.com/questions/57154/calling-future-method-from-batch-class

https://salesforce.stackexchange.com/questions/148096/getting-first-error-too-many-future-calls-1

Thanks