• Veronika Ivhed
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hi, 

I am trying to override the New button on Opportunity with the following Visualforce Page: 

<apex:page standardController="Opportunity">
<script>
window.top.location.replace("{!URLFOR($Action.Opportunity.New, null, [saveURL='/apex/RedirectToCompetitorAgreement',nooverride=1,save=1], true)}");
</script>
</apex:page>

When the user has entered the opportunity information and presses save he is redirected to the VF page "RedirectToCompetitorAgreement". Everything works as expected except that the record type selection page is shown two times. Any ideas on how I can fix this issue? 
Hi, 

I am trying to override the New button on Opportunity with the following Visualforce Page: 

<apex:page standardController="Opportunity">
<script>
window.top.location.replace("{!URLFOR($Action.Opportunity.New, null, [saveURL='/apex/RedirectToCompetitorAgreement',nooverride=1,save=1], true)}");
</script>
</apex:page>

When the user has entered the opportunity information and presses save he is redirected to the VF page "RedirectToCompetitorAgreement". Everything works as expected except that the record type selection page is shown two times. Any ideas on how I can fix this issue?