+ Start a Discussion

Call External Website from a Custom Button

Hi All


Here is my requirement. 

I have to call an external website from a custom button and display the result on a VF Page. 

I have a button on Contact Object. On the click of a button it should pick up the name field from contact and query the documents related to the name in the Website and display the documents on VF Page. 

 The place i am stuck is how to pass the cONTACT NAME to the website and pick up data.

Kindly help with the design.




  Seems like using an API to access this external site's data may be a more stable approach but without an API I would say you need to build the URL with query strings example -  www.google.com/search?q=help


  From there you could do something like use an iFrame within your VF page or perhaps consider using a BLOB type to read in the data stream from the site, render that as a PDF, and attach the PDF as a file to the record.



Kind Regards,


Tyler Hudson
Contact Us - We Can Help!

Salesforce Superheroes
1-888-407-9578 x123


Thanks for the reply . I was waiting for one. 

Assume that I have fields like Name and Email. 

I want to pass on teh values in Name and EMail to search the webiste. 

I want to have a field mapping. As in if name is xyz documents ABC is selected.

if name is 123 document DEF is selected and so on


As per your suggestion I can pass through an API  and also through search string.