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
Ankit Chauhan 10Ankit Chauhan 10 

How to create a visualforce application to access external web service and populate data from Salesforce

Hi I'm very new to this salesforce development community. So what i'm looking at is to create a visual force application which on Button click can fetch the data from Salesforce system (Like accessing some standards and custom objects data). And once we populate this data we need to called an external web service which will be consuming this Salesforce data.

Any idea please.
srlawr uksrlawr uk
sounds like you have a fairly standard situation there - so you are in luck it is definitely quite possible.

you will need to create a visualforce page (from the setup menu) - which uses the right standardController for the detail page from which you want to load it (this is how you get to add the page behind a Custom Button on the detail page).

From the visualforce page you will be able to add a controller extention - which when constructed can load all your data from custom and standard objects using SOQL.

You can also then add buttons, and links etc. which will give you loads of options for calling a webservice using the Apex standard HTTP request library.

All this will require a little knowledge/learning though, so I would recommend a free and fun tool we have for Salesforce called Trailhead..

The visualforce module is here, which also covers controller extensions:

This module will arm you with how to create a custom button:

We even have a module on calling web services:

I hope that helps! Earn all the badges you can!