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
Abhishek KedariAbhishek Kedari 

Displaying data from third party application on visualforce page

Hi,

    I want to get some infromation from third party application into salesforce. I can get the information from third party application using future method with callout=true, but How to display that data onto visual force page? Because future method can not return any value. and I do not want to create any new object to insert the received data because I am getting large list of data(records). Also I dont want to perform any operation on this data. I just want to display it on visualforce page.

Can anyone please help me with this?

Thanks,
Abhishek
Best Answer chosen by Abhishek Kedari
Balaji Chowdary GarapatiBalaji Chowdary Garapati
@Abhishek Kedari:

 An important thing  as you mentioned is that a future call can not return a value,so if you were using that code piece only from VF page, you can remove the future annotation and make sure that there are no DML call in the same method. Assign the result of callout to any list  or a wrapper class and display it on the vf page.

Note: you make use of "rerender" and "onComplete"  properties of actionfunction and command button tags to rerender a particular section or perform any other action  once the execution of webservice method is complete. You can also do a call out directly from the get method of a variable which is refered by visualforce page directly, so when that particular part of page is loaded it pulls the results using a callout and displays them on page.

It all depends on the requirement and the page that you are trying to build. If you can give more details about the requirement, we can discuss on things how to solve it!


hope this helps


Thanks,
Balaji

All Answers

Balaji Chowdary GarapatiBalaji Chowdary Garapati
@Abhishek Kedari:

 An important thing  as you mentioned is that a future call can not return a value,so if you were using that code piece only from VF page, you can remove the future annotation and make sure that there are no DML call in the same method. Assign the result of callout to any list  or a wrapper class and display it on the vf page.

Note: you make use of "rerender" and "onComplete"  properties of actionfunction and command button tags to rerender a particular section or perform any other action  once the execution of webservice method is complete. You can also do a call out directly from the get method of a variable which is refered by visualforce page directly, so when that particular part of page is loaded it pulls the results using a callout and displays them on page.

It all depends on the requirement and the page that you are trying to build. If you can give more details about the requirement, we can discuss on things how to solve it!


hope this helps


Thanks,
Balaji
This was selected as the best answer
Padmini S 26Padmini S 26
Hi Balaji,

Can you please share if you have any code samples for displaying data from third party on visualforce. It would be very helpful to me.

Thanks is Advance.