[SalesForce] Salesforce integration with external system: Calling REST service API from Salesforce synchronously on record create and update event

We are trying to integrate external system with Salesforce. Requirement is, whenever a record of a Custom object is created or updated in Salesforce, this event should synchronously call out to a RESTful API of the external system.

Since not being able to make synchronous callout from Apex Trigger is a well known limitation, is there a workaround we can use?

Best Answer

You should create a visualforce page and from there, submit a synchronous callout request to the external system.

visualforce callout

I have written my blog post Visualforce webservice callout synchronously & asynchronously on this.

Related Topic