+ Start a Discussion
Pari KatyalPari Katyal 

REST callout to external service

Hi, 
My requirement is that when an account is created in the Salesforce dashboard, I need to make a rest call-out to an external service to post the account details. 
For this, I have created a trigger with after insert / after update that calls the appropriate apex class (which makes rest callout).
Can someone please confirm if I am going in the right direction?
Any template or reference code for performing this would be very helpful.
Thanks and regards.
Best Answer chosen by Pari Katyal
Suraj Tripathi 47Suraj Tripathi 47

Hi,

You can take references from the below link:

https://www.sfdc-lightning.com/2019/10/how-to-do-callouts-from-apex-trigger-in-salesforce.html

If this link helps you please mark it as the Best Answer

Thank You

All Answers

tejaswini veliventitejaswini veliventi
you can simply use a WF Outbound message to achieve this instead of apex.
Suraj Tripathi 47Suraj Tripathi 47

Hi,

You can take references from the below link:

https://www.sfdc-lightning.com/2019/10/how-to-do-callouts-from-apex-trigger-in-salesforce.html

If this link helps you please mark it as the Best Answer

Thank You

This was selected as the best answer