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
venkatSanthanamvenkatSanthanam 

Overriding Save Button

I am trying to add a warning message like "Are you Sure" before Saving an Opportunity. I do not know how to over ride the save button. Could someone help me on this please?

 

Thanks
Venkat

jeffdonthemicjeffdonthemic

You are not going to be able to override the standard Salesforce.com Save button. You would need to create a Visualforce page to implement this type of functionality.

 

Jeff Douglas
Informa Plc
http://blog.jeffdouglas.com

venkatSanthanamvenkatSanthanam

So, Would the following work ?

1. Create VF page
     1a. use standard controller

     1b. extend customcontroller

     1c. hava JS that does the confirm javascript. if yes(call specific customcontroller  method from Javascript)  if no(dont do anything)

2.  Create Custom Controller

    2a. create method that does standardController.save()

    2b. Redirect to the called page

3. Create a custom button for Save and make it call the created VF page

 

will the above process work? I am currently working in this direction. Please tell me if this is the right approach.

 

Thanks

Venkat

jeffdonthemicjeffdonthemic

Vencat,

 

That sounds correct.

 

Good luck

 

Jeff

mallikammallikam

Venkat,

 

Were you able to achieve this?

 

thanks

Mallika