You need to sign in to do that
Don't have an account?

Execute javascript in Save Button
Whenever I create/update a opportunity in Salesforce, it should pop up a confirmation message. I found a JavaScript function but I don’t know how to use this in save button of a record.
Hi,
If you are working on the standard page (on object) of the salesforce then you cannot display the alert on the save button click. The alternative for that you can create a VF page in which you can display the alert message and insert that page in the Visual Force page section of the standard object page layout.
For example
<apex:page standardController="account" >
<script>
Alert(‘opportunity successfully saved’);
</script>
</apex:page>
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Hi Abhi,
Try below code :
"oncomplete" attribute can used to execute javascript after execution.