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
Nakul ChaudhariNakul Chaudhari 

HTTP callout from trigger using @future method is best practice suggested by Salesforce?

Hi All,

We have an integration application between Salesforce and .net.
We have cases getting inserted into Salesforce from .net application & once cases get inserted into Salesforce we want to call one .net api from Salesforce to get some data.
We can do that from after insert trigger on Case object and use @future method to call .net api from it.
Is this a best practice to call api from trigger?
Do we have any better alternative for doing this?

Regards,
Nakul
ShashankShashank (Salesforce Developers) 
Yes, it is recommmended by salesforce: https://success.salesforce.com/ideaview?id=087300000007LfiAAE
Nakul ChaudhariNakul Chaudhari
Thank you very much Shashank.