+ Start a Discussion
pavan kumar 177pavan kumar 177 

Can we create custom visualforce page for recordtype in standard object

Can we assign custom visualforce page to a record type of a standard object.I have two record types for standard object lead.My problem is how to create a custom visualforce for a recordtype. Because how to refer Leadstatus field based on a recordtype.

Thanks in advance.
@Karanraj@Karanraj
Check this blog post which helps you to display the picklist value based on the record type in the visualforce page.
1. http://bobbuzzard.blogspot.ca/2012/01/record-type-picklist-values.html
2. http://www.tgerm.com/2012/01/recordtype-specific-picklist-values.html?m=1
pavan kumar 177pavan kumar 177
My requirement is I had two record types.For one record type i had specify a pagelayout.For other recordtype i want to assign a custom visualforce so,whenever user try to create a lead from that record type custom visualforce page should be displayed..@S.Karanraj
@Karanraj@Karanraj
Using the action attribute in the apex:page tag you can able to call the controller class on load of the page and keep your logic to redirect the page to standard or your custom visualforce page.

http://blog.jeffdouglas.com/2008/11/14/redirecting-users-to-different-visualforce-pages/
suresh sanneboina 4suresh sanneboina 4
Hi Pavan,

Its not possible from the standard recordtype selection page. To accomplish this you need to override the new button to vf page. and in the vf page you prompt to select the record type and based on the selection navigate to 2 different vf pages.

No other way to get this done.
pavan kumar 177pavan kumar 177

Hi Suresh,

You know i have two record types for lead objects.And in that two record types only some user have access to only one record type and some users have access the both record types.Is it possible with this requirement.For only one record type i am facing this problem. Do you have any references for this.If avliable please share.    @suresh sanneboina 4

Thanks for sharing knowledge
suresh sanneboina 4suresh sanneboina 4
Hi Pavan,

Please confirm me are you using vf page or going with the standard salesforce functionality. If you are going with the standard salesforce functionality then when selecting the record type for the user who has only one record type access then he will be seeing only one record type in the record type selection page.

Instead for those users you can select the default record type selection.

Your name(in header) >> My Settings >> Display and layout >> Set Default Record Types.

if you like to go with custom button use the code 
{!URLFOR($Action.Lead.NewLead ,null ,[RecordType="RecordtypeId"])}
 
sahitya adminsahitya admin
can i create record types for only to display in vf page
 
sahitya adminsahitya admin
if so,how to do it,pls suggest