I am trying to build a custom New Case page, but am having issues getting sections to load based on the Record Type.
<apex:outputField label="Record Type: " value="{!Case.RecordTypeId}"/>
<apex:pageBlockSection rendered="{!Case.RecordTypeId == 'SFDC Request'}" columns="1">
<apex:outputText>This is the new case page for SFDC Request record layout.</apex:outputText>
</apex:pageBlockSection>
The above code outputs the correct record type in the first line (the outputField), but the BlockSection does not render. I have also tried using {!Case.RecordType.Name} but that does not work either (in either the render or the outputField).
Here is what is displayed when SFDC Request record type is selected using the above code snippit:
Any suggestions as to why this is not working?
Trying RecordType.Name:
<apex:page StandardController="Case">
<apex:form >
<apex:pageBlock title="New Case" mode="edit" >
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
<apex:commandButton action="{!cancel}" value="Cancel" onclick="window.close()"/>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="1">
<apex:outputField label="outputField Case.RecordTypeId is: " value="{!Case.RecordTypeId}"/>
<apex:outputText label="outputText Case.RecordTypeId is: "> {!Case.RecordTypeID}</apex:outputText>
<apex:outputField label="outputField Case.RecordType.Name is: " value="{!Case.RecordType.Name}"/>
<apex:outputText label="outputText Case.RecordType.Name is: ">{!Case.RecordType.Name}</apex:outputText>
</apex:pageBlockSection>
<apex:pageBlockSection rendered="{!Case.RecordType.Name == 'SFDC Request'}" columns="1">
<apex:outputText >This is the new case page for SFDC Request record layout.</apex:outputText>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Results: