Find your content:

Search form

You are here

Override the standard save button with a custom button


I am planning to do something like below:

  1. Create a custom detail page button to replace the save button.
  2. When user clicks the button to save a record it should execute the standard save method after setting certain additional fields on the object apart from the others set by users.

What will be the best way to do this without using visualforce page?

Attribution to: Anutosh Datta

Possible Suggestion/Solution #1

you could create a web-service that is called via javascript using the

Attribution to: ebt

Possible Suggestion/Solution #2

Do you want to to override the standard 'Save' button for this?

You can simply write a 'before insert, before update' trigger that will do all field setting you need before saving the record into the database

Attribution to: Bao-Long Nguyen-Trong

Possible Suggestion/Solution #3

Another option would be to use a Workflow Rule to automatically set the fields in question automatically after the user saves the new record.

You can read more about workflow here:

Attribution to: Benj
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content