+ Start a Discussion
Nikhil NayanuriNikhil Nayanuri 

How to assing VisualForce custom page to record type ?????

Hi All,
   
   I got this requirement  by using VisualForce page.So any one can help me.
LearnerrrLearnerrr
Create one Apex class method and  call it in VF page 
<apex:page standardController="Case" extensions="ExtensionClass" action="{!EditpageRedirect}">
  
</apex:page>

========================================================
public with sharing class ExtensionClass {
    public Case C1;

    public ExtensionClass(ApexPages.StandardController controller) {
        this.C1 = (Case)controller.getRecord();
    }
     public PageReference EditpageRedirect() {
        if(ApexPages.currentPage().getParameters().get('RecordType') == '0127F000000erLz'){
            PageReference pageRef = new PageReference('/apex/VF_PageName);
            pageRef.setRedirect(true);
            return pageRef;
            }
             else if(ApexPages.currentPage().getParameters().get('RecordType') == '0127F000000erM4'){
             PageReference pageRef1 = new PageReference('/apex/VF_PageName);
             pageRef1.setRedirect(true);
             return pageRef1;
             }
             
             return Null;
             
            }

}