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
Ashu sharma 38Ashu sharma 38 

how to set vf page in record type

Hello,

As i created a vf page with extensions,now i want to set this vf page to the new Record type,what actions should i do for this functionality.
 I have tried this but its not working....

Vf page
====
<apex:page standardController="Opportunity" extensions="opportunityinsert" docType="html-5.0">
    <apex:form rendered="{!(RecordType2)}">
        <apex:detail />
        <apex:sectionHeader title="Opportunity Edit" subtitle="New Opportunity" help="https://help.salesforce.com/articleView?err=1&id=opportunities.htm&type=5"/>
        <apex:pageBlock title="Opportunity Edit" mode="edit">
            <apex:pageMessages ></apex:pageMessages>

in class
=====
public class opportunityinsert {
    public boolean RecordType2  {set;get;}
//in constructor:
RecordType2  =true;

}
kishore Thudikishore Thudi
If you have only one record type,want to use your custom vf page for that, you set that in Opportunity Object details.

Go To => Object Manager => Opportunity => Click Buttons,Links,and Actions => Edit 'New ' button and In the Override Properties set your custom vf page.

If you have multiple record types, want to set your custom vf page only for one record type, check the below link, which might help you
https://developer.salesforce.com/forums/?id=906F000000095W3IAI

Thanks,
Ashu sharma 38Ashu sharma 38
Hi Kishore,
Thank you for reply but i am trying in this format but this is not working kindly see the link..

https://developer.salesforce.com/forums/?id=906F000000096r5IAA

i dnt know from where i am doing mistake but its not working for me,.
Help me on this ..