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
Raghu PedabbaRaghu Pedabba 

Record Type Selection Page is displayed Twice

Hi All,

I wanted to display seperate Visualforce page for a particular record type.
Did that by following this link http://blog.jeffdouglas.com/2008/11/14/redirecting-users-to-different-visualforce-pages/
 But, when I select any other record type the Record Selection Page is displayed twice ?

Apex:
public class DispatcherLeadNew{          public DispatcherLeadNew(ApexPages.StandardController controller) {         this.controller = controller;     }     public PageReference getRedir() {         PageReference newPage;         if (ApexPages.currentPage().getParameters().get('RecordType') == 'xxxxxxxxxxxxxxxxx') {             newPage = Page.LeadAddressLookup;             return newPage.setRedirect(true);         } else {             return null;                      }     }     private final ApexPages.StandardController controller;      }

VF Page:
<apex:page standardController="Lead" showHeader="true" sidebar="true" tabStyle="Lead" extensions="DispatcherLeadNew" action="{!nullValue(redir.url, urlFor($Action.Lead.New, null, null, true))}"> </apex:page>


What is wrong ?

Thanks,
Raghu