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
abhishek satputeabhishek satpute 

i have one doubt ->>how to call future method from batch

AbhishekAbhishek (Salesforce Developers) 
Salesforce doesn't allow a future method to be called from another future method or a batch job. Before calling your future method, you should check if a future or batch job is already running. This would be a best practice for any code you ever write that calls a future method. The good news is that it's very easy. Example below: 

if(System.IsBatch() == false && System.isFuture() == false){ 
    // make your future call here 
}


For further suggestions check this too,

https://developer.salesforce.com/forums/?id=906F0000000AqdVIAS

https://developer.salesforce.com/forums/?id=906F0000000BQR7IAO

https://www.sfdc-lightning.com/2018/10/future-methods-in-salesforce.html


Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks.