You need to sign in to do that
Don't have an account?
Peter Minetree
Can someone please explain what this means so I can have a better understanding? The context to this question is in bold and italicized
Future methods are typically used for:
Callouts to external Web services. If you are making callouts from a trigger or after performing a DML operation, you must use a future or queueable method. A callout in a trigger would hold the database connection open for the lifetime of the callout and that is a "no-no" in a multitenant environment.
Callouts to external Web services. If you are making callouts from a trigger or after performing a DML operation, you must use a future or queueable method. A callout in a trigger would hold the database connection open for the lifetime of the callout and that is a "no-no" in a multitenant environment.
Callouts cannot be made from Trigger beacuse it'll block/hold up the database transaction until the callout gets completed. And since Salesforce works in Multi-tenant architecture, where resources (here resources are governer limits ) are shared, it'll impact performance.
I hope you've got some clarity.Please check the link below for more:
https://salesforce.stackexchange.com/questions/5602/http-callout-from-triggers
Thanks,
Sucharita