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
Tim045678Tim045678 

Access and display data from external REST service - Where to start?

Hello,

 

I'm very new to developing with Force.com.  I pick up things fast and enjoy learning ... but after reading about Force all day ... I just have no idea where to start.  I'm very excited to get running on this ... Here's what I'm looking to do ... can anyone maybe point me in the right direction?  

 

Thank you very much in advance.

 

---

REQUIREMENT:

 

I'm a .NET developer.  

 

When viewing a Contact, Account, or Lead in Salesforce, I would like to display another window or widget or section on the same page containing data that is queried from an external application through a REST layer that we have created.  

 

I want to be able to pass the email address of the Contact, Lead, or Account in salesforce to my external REST ... then return the data and display it in a very simple list.

 

---

 

 

Jia HuJia Hu

Apex provides several built-in Http classes to integrate to REST-based services. 

 

1. firstly use Apex Http Callout to call the remote Web services,  you may need to login first based on the setting of remote system,.. and you can pass the parameters in the Http callout to the remote Web service

 

see: Invoking HTTP Callouts

 

http://www.salesforce.com/us/developer/docs/apexcode/index.htm

 

2.  if everything is fine, you can retrieve the data in XML, then use DOM Classes or JSON Classes to parse XML or JSON content in the Httpresponse

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_xml_dom.htm

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_json_overview.htm

 

3. then you can display the data in a Visualforce page.

 

The following link may help you to get some ideas,

Apex Web Services and Callouts

http://wiki.developerforce.com/page/Apex_Web_Services_and_Callouts

 

Test Test 5097Test Test 5097
How do I display the data in visualforce page , that I got from http callout?