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
mark_pamark_pa 

Display Pop-Up on Custom Object

Good morning everyone.

 

I would like to display a pop-up on save of a custom object record on save. I have installed the Riptide popup app but couldn't make it work for a custom object.

 

I tried to follow Teh Nrd's VisualForce pop-up walk-through but adding that to a save button to display the message on save is a bit beyond me.

 

http://www.tehnrd.com/visualforce-pop-up/

 

Any help or direction is appreciated.

jotr408jotr408

Hi, 

I would like to know how to do it on the save option as well.  Have you figured it out?

 

Please share.  Thanks.  

SabrentSabrent

I ran into the same problem wherein I wanted a Popup on Saveaction.i.e execute JavaScript and Apex "Save" at the same button click and this is what I did based on a solution posted in the Discussion Board .

 

This worked pretty well for me.

 

<apex:page standardController="Account" extensions="attachmentsample">
<script type="text/javascript">
function displaymessage()
{
alert("You must complete step 4 after all of your documents are attached !");
}
</script>


<apex:form >
<apex:sectionHeader title="Upload a Attachment into Salesforce"/>
<apex:pageblock >
<apex:pageblocksection columns="1">
<apex:inputfile value="{!myfile.body}" filename="{!myfile.Name}" />
<apex:commandbutton value="Click Here to Attach File" action="{!Savedoc}" onclick="displaymessage()" />
</apex:pageblocksection>
</apex:pageblock>
</apex:form>

</apex:page>

 

 

 

 

 

 

 

 

 



mark_pamark_pa

I evnetually figured out somethign that worked for me.

 

I created a new visualforce page and used the following example below.

 

Then add it to your page layout for the object with a height and width of 0. Works perfectly.

 



 

<apex:page standardController="Object_Name__c"
rendered="{!Object_Name__c.Field_Name__c=FALSE}">

    <script type="text/javascript">
    {
        window.alert(Insert the message that you would like to display when the criteria above = true.");
    }
    </script>
</apex:page>