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
nsutgionsutgio 

From Visual Force Page To An External Site For Processing

Hi, 

I'm new to salesforce and trying to develop a Visual Force page that will get inputs and send it somewhere, specifically to our web application where data sent will be going to process.

A simple illustration is;

If my application were to calculate a simple mathematical operation with inputs 11 + 5 these inputs will be send to my web app to where it will be processed and the result for it will be forwarded back to my salesforce app for display which is 16.

 What should be the best way to do it?

Thanks.
Best Answer chosen by nsutgio
Fahad-AkhtarFahad-Akhtar
Hi Nsutgio,
You can use different approaches to solve for this problem:
1) You can embed your web app and expose it using VF pages and ask user to directly input in your web app
2) You can use APIs to send data to your web server and send back the result as a response
3) If you already have ability to process an outbound message, you can use it.
4) You can pass input parameter to your web application as a post and redirect user to your site page for response.

Thanks,
Fahad Akhtar

All Answers

Fahad-AkhtarFahad-Akhtar
Hi Nsutgio,
You can use different approaches to solve for this problem:
1) You can embed your web app and expose it using VF pages and ask user to directly input in your web app
2) You can use APIs to send data to your web server and send back the result as a response
3) If you already have ability to process an outbound message, you can use it.
4) You can pass input parameter to your web application as a post and redirect user to your site page for response.

Thanks,
Fahad Akhtar
This was selected as the best answer
nsutgionsutgio
@Fahad-KK

Thank you for your suggestions, but I think I can only use number (2). With that can you show me sample codes or a great tutorial on how to do it with APIs?

Thanks.
 
Fahad-AkhtarFahad-Akhtar
@nsutgio

This should give you a good start "https://developer.salesforce.com/page/Apex_Web_Services_and_Callouts".
nsutgionsutgio
Thanks!