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

simple alert popup on opportunity
I want a pop-up with an informational message when a user closes an opportunity to make it an account. So, I can create an s-control that has an alert().
<html> <head> <script> var result = "{!Opportunity.StageName}"; function init() { if (result == "Closed") { alert("My message goes here."); } } </script> </head> <body onload="init()"> </body> </html>
Can I use the merge field syntax to obtain the stage name of the opportunity being edited as I'm using above in the s-control?
In order to call this s-control, I would need to override the edit button on the opportunity in the buttons and links section, is that correct?
Thanks.
You should have no problem using the merge fields in your sControl. However, instead of doing a button override simply add the sControl to the page layout and format the size so that it is not impactful to the user. This will allow you to keep the alert that you require. It will also display the alert every single time the opportunity page is accessed for records that are "Closed," which may become annoying to your Users.
-greg