- October 25, 2018 at 3:11 pm #50248Divya #726
When would you use the Salesforce @future annotation?
Use cases for @future annotation?August 26, 2019 at 11:16 am #61641Laveena #25
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.
Please Register to reply to this topic. /