On an object detail page, I want that once the user clicks on the save button, the object is saved, and a web service callout is executed. Thus, the user feels it's a "normal" save. Is there a way to do that without VF page ?

I first created a button which executes JS code, calls a class executing the callout and inserting the object, but I cannot place the button in the edit-mode page.


2 Answers 2


There is no way to override save button and place that on edit page. Why dont you write a trigger on Insert & update and invoke a future method and do a callout.

  • Yes, I would go for the trigger too, perhaps in an @future call as @crmprogdev said
    – mkorman
    Commented Jan 13, 2016 at 17:00

You'd need to do this either with a custom controller and VisualForce page that replaced the standard page or else using a trigger that fired on after AfterInsert/AfterUpdate. A custom controller could make a call to your web class as part of the save method. There are limits surrounding this in terms of response time so it might be best to put that into an @future call.

  • 1
    and pay attention to governor limits with triggers and future
    – cropredy
    Commented Jan 13, 2016 at 18:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .