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
Krishna Kanth NallamilliKrishna Kanth Nallamilli 

Webservice

I am trying to call a web services from record page which is nothing but a detailed page by using a button click event. when a user clicks the button it will call the web service and the values will be automatically shown in the record . Is it possible to call the web service when I open a record automatically it should call a web service and it should show the data instead of button click?
Ashish_Sharma_DEVSFDCAshish_Sharma_DEVSFDC
Hi,

Try to use a inline VF page which will call webservice on load and display result on page using AJAX functionality.

 
Krishna Kanth NallamilliKrishna Kanth Nallamilli
Dear Sharma,

I need it in a record level. If I click the record It shoukd Automatically cal the web service in the record load itself. 

Thank you.

Regards,
Krishnakanth
Ashish_Sharma_DEVSFDCAshish_Sharma_DEVSFDC
Hi Krishna,

Either use Vf page action method or onload  javascript/jquery method to call webservice.
sforce.apex.execute ("class", "Web Service Method",{});
As soon as you get response,update only result section on your page.

Let us know if it helps.
 
Krishna Kanth NallamilliKrishna Kanth Nallamilli
Dear Sharma,

In this Below image. When I open this record Polyhose india. The web service event should happend... Is It possible?
User-added imageo

As of now I am using the Button to call the web service in record. as shown in the below.
User-added image

When I click this InsertKPI button the web service call out will happen and the data will be shown.

Now I don't need this button here when i open the record Polyhose india it should call the web service automatically and should show the data.
please let me know if it possible or not if possible what is the best way to do it.

Hear I am not using VF page.


Thank you.

Regards,
krishnakanth
Ashish_Sharma_DEVSFDCAshish_Sharma_DEVSFDC
Hi Krishna Kanth Nallamilli,

This vf page will be inline page on your record detail page.
You will not able be able to figure on detail page if some vf page is present .

Vf page will work behind the curtain.

Let us know if it helps.