• #50248
     Divya #726
    Forcetalks

    When would you use the Salesforce @future annotation?

    Use cases for @future annotation?

     

    #61641
    Salesforce | Laveena Laveena #25
    Forcetalks

    Hi Divya,

    1. When you have to make callout to external web-services after DML operation from trigger because it hold the database connection open for lifetime.
    2. Due to sort of resource some method need to run in their own thread, so that it can use that resources when they are available, there you can use future annotation.
    3. Due to limited user’s access on record sometimes DML operation on certain sObject cannot be mixed with DML operation on another sObjects. At that time we need to change the transaction of both DML operation. Here we can use future method.
    Thanks

Viewing 2 posts - 1 through 2 (of 2 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 2020 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?