• #30979
    Forcetalks

    Can we call a Future method from Salesforce batch class?

    Can we call a Future method from Salesforce batch class?

    Tagged: , , , , ,

    #31247
     Prachi #7
    Forcetalks

    Hello Avnish,

    Salesforce doesn’t allow a future method to be called from another future method or a batch job.

    While @Future cannot be called from a batch class, a webservice can. A webservice can also call an @future method. So have your batch class call an apex webservice that in turn calls your @future method.

    Thanks.

    #34584
    Salesforce | shariq shariq #1
    Forcetalks

    Hi,

    To make it more simple –

    You can’t call asynchronous method from another asynchronous method.

    Hope this helps.

    #34586
    Salesforce | Parul Parul #2
    Forcetalks

    No You can not because batch class is a Synchronous process and @ future is Asynchronous.

     

     

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2018 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?