[SalesForce] Override a standard “New” button to redirect to a VF page

I am trying to redirect the "New" case button to point to an intermediate page which will have 5 hyperlinks. These links will be pointing to the standard edit mode with some field values passed through the URL. Below is the image of the intermediate page.

Intermediate Page

User can click on any one of the option and they should be redirected to standard edit page for case.

Following is the URL is am using for redirect.

https://na15.salesforce.com/500/e?00Ni000000BGRVE=Communications&00Ni000000BGtUJ=Survey&00Ni000000BH0li=General%20Questions&cas8=Low&cas7=Closed&retURL=%2F500%2Fo

However on the page is not being redirected to the standard edit mode, the page refreshes itself and the user stays in the same page as the image above.

After override can we not access the standard pages? If so, is there any other way to access that page?

Best Answer

You can add the nooverride parameter to the page to get back to the normal page. Using your example URL:

https://na15.salesforce.com/500/e?nooverride=1&00Ni000000BGRVE=Communications&00Ni000000BGtUJ=Survey&00Ni000000BH0li=General%20Questions&cas8=Low&cas7=Closed&retURL=%2F500%2Fo

If you are using URLFOR, you can also specify TRUE as the fourth parameter to include the nooverride parameter. If you are using a PageReference, you can add it as a parameter:

ref.getParameters().put('nooverride','1');

The value doesn't matter, by the way-- it doesn't have to be 1. It's just a convention that most developers use from what I've observed (because salesforce.com themselves use that value, and people copy examples).

URLFOR has an optional fourth parameter that you can use. This forces the correct parameter for overriding any button override and showing the standard page. Here's an example that uses that (from the comments):

{!URLFOR($Action.Case.NewCase,null,['00Ni000000BGRVE'='Benefits','00Ni000000BGt‌​UJ'='401K','00Ni000000BH0li'='General Questions','cas8'='High','cas7'='Open'],true)}

You can use general formula functions inside the third parameter to include things like TODAY() or BR(). Text concatenation should use the salesforce.com formula syntax: 'Edit ' & Name might render as "Edit John Doe".