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
TenaTena 

Pop-Up for Standard page on Save

How do I get a pop up when the user clicks on Save(Opportunity and Case)?  I just have to give them messages that they have to say OK to.  I don't see how I do it...I found an article over 2 years old but it doesn't come close to working for me.  What am I missing?

 

NashorNashor

I guess you could simple javascript alert tags to invoke the pop up and display the message.

TenaTena

I know I can do it on the loading of the page.  I would be OK with doing it on the "edit" button also but what about the inline editing?  I am unsure how to get around that.  Have you done it with the Edit or Save button?

 

 

KodiKodi

Hi,

 

I think it can be able to do using javascript.


 below sample code,

 

 

<apex:commandButton value="Save"  action="{!Save}" Onclick="call();"/>

 

<script>

function call()

{

alert("ok");

}

</script>

TenaTena

Would this require me to override the standard save button?  So I would have to make a new button and then hide the standard one.  Is that right? 

KodiKodi

Hi,

 

it is right. once click save button the pop up window will be displayed if click 'OK' means after that save record.

TenaTena

I am not sure if I understand.  The example:

<apex:form >
<apex:commandButton value="Save"  action="{!Save}" Onclick="call();"/>
</apex:form>
<script>
function call()
{
alert("ok");
}
</script>

 

Requires me to create(appex:commandButton) a new Save button but doesn't override the standard Save button.  Is that correct?  If so then I need to know how to remove the Standard "Save" button.  It isn't an option on the page layout.  It would also mean that the Save button would always be on the screen rather than just the edit.  I would pefer also not to do too much of hacking or use items that are browser limited.