Skip to main content
I have created 2 VF pages and i want to display those VF page according to the record type selection. But it was showing 2 VF pages one by one at a  time. Please any one suggest or modify the below.

<apex:page controller="OppRenderPageClass">

   <apex:outputPanel rendered="{!IF(Opportunity.RecordTypeId == '012400000009mCCAAY',true,false)}">

        test<apex:outputField value="{!Opportunity.RecordTypeId}"/>

        <apex:include pageName="OppVfPage" />

    </apex:outputPanel>

    

    <apex:outputPanel rendered="{!IF(Opportunity.RecordTypeId !='01240000000UWKDAA4',true,false)}">

        <apex:include pageName="LostReason" />

    </apex:outputPanel>

    

</apex:page>
1 个回答
  1. 2015年8月19日 13:31
    Hi Avesh,

    Use that code :

    <apex:page controller="OppRenderPageClass">

       <apex:outputPanel rendered="{!IF(Opportunity.RecordTypeId == '012400000009mCCAAY',true,false)}">

            test<apex:outputField value="{!Opportunity.RecordTypeId}"/>

            <apex:include pageName="OppVfPage" />

        </apex:outputPanel>

        

        <apex:outputPanel rendered="{!IF(Opportunity.RecordTypeId =='01240000000UWKDAA4',true,false)}">

            <apex:include pageName="LostReason" />

        </apex:outputPanel>

        

    </apex:page>

    Thanks,

    Rajendra
0/9000