06 Jun Override a Standard Button with Visualforce and running Round and Round in Circles
Are you that person who overrides the standard button with an awesome Visualforce page. Your page is beautifully working and then at the end want to send the user to the original page which you just override.
Hey you think to yourself, all I got to do to is, copy the original URL in address bar paste it in notepad and add it to the page. As simple as riding a bike.
If you did think this way, you are in for a surprise. Life is not exactly as easy as it seems, for when you override a standard Salesforce button or the link, you automatically override the original page too.
So your little plan goes down the drain and all we see in a infinite loop like this.
It was many years ago when I wasted an entire night in this vicious circle and decided to tell you a magic spell to help you out to break out of the circle.
When you pass on the URL of the original page in the Visualforce controller, simply add a URL parameter
For Example: Suppose you want to pass it to a page, you might possibly want to pass it on to.
http://naX.salesforce.com/somePage&nooverride=1 to the page.
With this magic spell, your Visualforce page will magically transfer the control to the original page without redirecting it to itself.