You need to sign in to do that
Don't have an account?
Glenn Daly
VF page to appear if record = x record type. Page Layout to appear if record = y record type
I only wish for the vf page below to be displayed if the record type of the record clicked on is "unavailable_r_d_project", otherwise I want the standard page layout. However it's removing the block section "R&D Project Detail" if the record is of "unavailable_r_d_project". where am i going wrong?
<apex:page standardController="Product2">
<apex:form >
<apex:pageBlock rendered="{!Product2.recordType.DeveloperName == 'Unavailable_R_D_Project'}">
<apex:pageBlockSection columns="2" showHeader="true" title="R&D Project Detail" rendered="{!Product2.recordType.DeveloperName == 'Unavailable_R_D_Project'}">
<apex:inputField Value="{!Product2.Name}" label="Project Name" / >
<apex:inputField Value="{!Product2.R_D_Directorate__c}"/>
<apex:inputField Value="{!Product2.Status__c}"/>
<apex:inputField Value="{!Product2.Expected_Next_Stage_Date__c}"/>
<apex:inputField Value="{!Product2.R_D_Unique_ID__c}"/>
<apex:inputField Value="{!Product2.Lifecycle_Status__c}"/>
<apex:inputField Value="{!Product2.Project_Owner__c}"/>
<br/>
<apex:inputField Value="{!Product2.Alternative_Project_Contact__c}"/>
<br/>
<apex:inputField Value="{!Product2.Can_the_project_be_discussed_externally__c}"/>
<br/>
<apex:inputField Value="{!Product2.Looking_for_participants__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection columns="2" showHeader="true" title="Description Information">
<apex:inputField Value="{!Product2.Project_Description__c}"/>
<apex:inputField Value="{!Product2.Cluster_Area_Portfolio__c}"/>
<apex:inputField Value="{!Product2.Benefits_to_the_customer__c}"/>
<apex:inputField Value="{!Product2.Eligibility__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection columns="2" showHeader="true" title="Service Information">
<apex:inputField Value="{!Product2.Risks__c}"/>
<apex:inputField Value="{!Product2.Include_in_Dashboard__c}"/>
<apex:inputField Value="{!Product2.Expected_Date_Service__c}"/>
<apex:inputField Value="{!Product2.Sector__c}"/>
<apex:inputField Value="{!Product2.Expected_Date_Alpha__c}"/>
<apex:inputField Value="{!Product2.Jisc_Directorate__c}"/>
<apex:inputField Value="{!Product2.Expected_Date_Beta__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection columns="2" showHeader="true" title="Progress Information">
<apex:inputField Value="{!Product2.Level_of_Demand__c}"/>
<apex:inputField Value="{!Product2.Feasibility__c}"/>
<apex:inputField Value="{!Product2.Notes_on_Current_Progress__c}"/>
<apex:inputField Value="{!Product2.Expected_Usefulness__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection columns="2" showHeader="true" title="System Information">
<apex:inputField Value="{!Product2.createdbyId}"/>
<apex:inputField Value="{!Product2.lastmodifiedbyId}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
<apex:page standardController="Product2">
<apex:form >
<apex:pageBlock rendered="{!Product2.recordType.DeveloperName == 'Unavailable_R_D_Project'}">
<apex:pageBlockSection columns="2" showHeader="true" title="R&D Project Detail" rendered="{!Product2.recordType.DeveloperName == 'Unavailable_R_D_Project'}">
<apex:inputField Value="{!Product2.Name}" label="Project Name" / >
<apex:inputField Value="{!Product2.R_D_Directorate__c}"/>
<apex:inputField Value="{!Product2.Status__c}"/>
<apex:inputField Value="{!Product2.Expected_Next_Stage_Date__c}"/>
<apex:inputField Value="{!Product2.R_D_Unique_ID__c}"/>
<apex:inputField Value="{!Product2.Lifecycle_Status__c}"/>
<apex:inputField Value="{!Product2.Project_Owner__c}"/>
<br/>
<apex:inputField Value="{!Product2.Alternative_Project_Contact__c}"/>
<br/>
<apex:inputField Value="{!Product2.Can_the_project_be_discussed_externally__c}"/>
<br/>
<apex:inputField Value="{!Product2.Looking_for_participants__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection columns="2" showHeader="true" title="Description Information">
<apex:inputField Value="{!Product2.Project_Description__c}"/>
<apex:inputField Value="{!Product2.Cluster_Area_Portfolio__c}"/>
<apex:inputField Value="{!Product2.Benefits_to_the_customer__c}"/>
<apex:inputField Value="{!Product2.Eligibility__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection columns="2" showHeader="true" title="Service Information">
<apex:inputField Value="{!Product2.Risks__c}"/>
<apex:inputField Value="{!Product2.Include_in_Dashboard__c}"/>
<apex:inputField Value="{!Product2.Expected_Date_Service__c}"/>
<apex:inputField Value="{!Product2.Sector__c}"/>
<apex:inputField Value="{!Product2.Expected_Date_Alpha__c}"/>
<apex:inputField Value="{!Product2.Jisc_Directorate__c}"/>
<apex:inputField Value="{!Product2.Expected_Date_Beta__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection columns="2" showHeader="true" title="Progress Information">
<apex:inputField Value="{!Product2.Level_of_Demand__c}"/>
<apex:inputField Value="{!Product2.Feasibility__c}"/>
<apex:inputField Value="{!Product2.Notes_on_Current_Progress__c}"/>
<apex:inputField Value="{!Product2.Expected_Usefulness__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection columns="2" showHeader="true" title="System Information">
<apex:inputField Value="{!Product2.createdbyId}"/>
<apex:inputField Value="{!Product2.lastmodifiedbyId}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>