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
Sandy Comeau 5Sandy Comeau 5 

VF Page to Display on the click of the "New" Button

When a user creates a "New" Opportunity I want a VF Page to Display asking the user if he has satisfied a requirement.  I need two options "Yes" to go forward, or "No" to go back.  I have the "No" part...but I can't figure out how to add another "Yes" button to proceed to be able to create a New Opportunity.
This is the first part of my code:

<apex:page standardController="Opportunity">

<p>This Opportunity MUST be Qualified to Proceed!</p>
<apex:form >
<apex:commandbutton action="{!cancel}" value="Go Back" rerender=""/>
Raj VakatiRaj Vakati
Can you try something like this? 
<apex:page StandardController="Opportunity" >
if(confirm("Are you sure?");)
   window.location.href = '.. Page URL ' ; //your redirect url



Sandy Comeau 5Sandy Comeau 5
Hi Raj,
That doesn't seem to work.  I need to use a button for "No" (which will redirect to the Opportunity Object Main Page), and another button for "Yes" that will allow the user to create a New Opportunity.