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
VinodVinod 

Save Button

Hi,

 

I am having a standard salesforce page and a save button in it.

 

I want to do the following :-

 

a) raise a Popup window before the actual save is done with 'Continue' or 'Cancel' buttons in it.

b) Once continue is clicked it should save the record.

 

I tried using the saveurl, s-controls but not successful.

 

 

Thanks

gvk

werewolfwerewolf
The only way you can do that right now is to make a custom edit Visualforce page.  You can't edit the Save button behavior.  SaveURL won't work because that gets called after the save is done.
EtienneCoutantEtienneCoutant

What about creating a new button called 'Save' that would Execute some javascript, and remove the default one from the layout...

 

The code executed by the new button could look like:

 

var answer = confirm("Are you sure you want to Save that record?");
if (answer){
if(record exists) update
else insert

window.top.location = "{!URLFOR($Action.RecordType.View, RecordID)}";
}


Let me know.
werewolfwerewolf
You can't put custom buttons on an edit page, so that won't work either.
EtienneCoutantEtienneCoutant
Arg... That is right...