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
mallikammallikam 

URLFOR redirecting to the same page

I have written the following code for VF page and I have overrided opportunity new button with this page:

 

<apex:page standardController="Opportunity"> <script> window.top.location.replace("{!URLFOR($Action.Opportunity.New, opportunity.id, [saveURL='/apex/oppRedirect', retURL='/'+opportunity.id, cancelURL='/'+opportunity.id], true)}"); </script> </apex:page>

 

The problem is that when I click new opportunity, I am directed to another page that has a pick list to select tha opportunity type. When I selct the opportunity type and hit continue, I am getting redirected to the same page! But when I hit continue again, I am getting redirected to the next page correctly..I am unable to fix the problem of getting redirected to the same page when I click continue first time though..any help is appreciated!

JimRaeJimRae

Add the nooverride parameter to your URL.

I believe you can specify it as a parameter of hte URLFOR, if not add nooverride=1 to your URL string.

SkadamSkadam

Hi

 

how did you resolve this issue i am facing a same issue.

 

Thanks

Sachin