You need to sign in to do that
Don't have an account?
Raghu 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
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