[SalesForce] How to override the Record Type selector and still use the standard “new” page

I would like to use a custom VF page for the record type selection page for new Opportunities but after that, I want the standard new/edit page to be displayed.

I have the custom VF page set to override the "New" button on the Opportunity but when I push to "/600/e" (the new Op page) from my custom controller, I get pushed back to my own VF page.

Is there a way I can push to the new/edit page instead of getting stuck in a loop?

Note: I have confirmed the VF page works as expected when it is not overriding the "New" button.

Code:

System.PageReference pageReference = new System.PageReference('/006/e');
return pageReference;

Best Answer

To avoid the spurious save, you can add RecordType and nooverride parameters to the '/006/e' URL. See my blog post here for a related but slightly different use case that includes some code. This assumes all you are passing from your custom page to the normal page is the selected record type.

You simply add this to your PageReference: pageReference.getParameters().put('nooverride', '1');