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
giorgio70giorgio70 

HTTP Callout response: how do I update a SFDC record with data coming back from my callout

Hello

 

I develped an HTTP Callout to an internal system.

We basically issue a call to create a new record in a database, and in return we get the ID of the newly created record .

 

I created a Visualforce page for a custom object, called WS.

The page has a controller extension.

This page has a custom button, which calls an action defined in the controller extension. The action issues the callout to the WS.

 

When I get my response back, I would like to update a the WS record with the data I receive back from the callout.

 

What is the best way to do this?

 

Thanks a lot in advance

Giorgio

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Abhay AroraAbhay Arora

Hi,

 

Basically you will have to create a web service method and consume that from remote system to get data back in your record.

 

Pass the record ID in your web service call and from remote syetem use that ID to pass data back to the webservice method and pass result to your record back