+ Start a Discussion
echolane.ax304echolane.ax304 

How to attach Code to Save Button - or equivalent solution

We have an S-control that initializes some fields of a newly created object.  It runs when the object is *displayed* after the "Save" button is clicked.

Unfortunately it does not run if the "Save and New" button is clicked, because the saved page is not displayed after that click.

How might we cause the initialization code to run no matter what?

Can we attach the code to the "Save" and "Save and New" buttons?

Thanks!
sfdcfoxsfdcfox
Right now, you have to be Unlimited Edition (you need Apex Code). Otherwise, you can't do anything with the save / save & new buttons.
 
~ sfdcfox ~
echolane.ax304echolane.ax304
thank you very much for your kind and prompt as always advice!
SeawardTSeawardT
Is this true of the Close button?
TCAdminTCAdmin
SeawardT,

The close button can be overwritten.  You can find it by going to Setup | App Setup | Customize | Cases | Buttons and Links.