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
A S 31A S 31 

To Call Custom Button URL in Apex code

Hi,

I have created Custom Detail Page Button with a HTTP URL. When user clicks on that button on a record, the URL link gets executed( Contacts third party server) and a field value is updated with the result on the record.

I have a requirement to not use this custom button and make the process automatic i.e. to execute URL Execution when a record is created ( Instead of user clickling on the button everytime).

Do anyone have idea how to call this HTTP URL in the apex class when a record is created?

Thanks in advance
SONAL GSONAL G
Hi,

I guess u can write trigger on the object !! In Trigger you can perform http callouts (Only limit is you have to make http callout as future method) !!
A S 31A S 31
Hi Sonal, What is the Future method call outs?. Trigger does not udpate the records real time if we use future methods? Can you give me some example  if you have ? Thanks
SONAL GSONAL G
Hi,
You please refer following links,
http://sfdcintegration.blogspot.in/2013/05/cheenath.html
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_future.htm
sflearningsflearning
@A S 31

Were u able to do the same??
please reply...
Thanks