You need to sign in to do that
Don't have an account?
aparna d 1
Dynamically display sections on a Visualforce page based on record type
I want to display case fields based on related opportunity recordtype. I am facing issues.Anyone please help on this.
<apex:page standardController="Case" showHeader="false" applyBodyTag="false" applyHtmlTag="false">
<apex:form >
<apex:outputPanel rendered="{!IF(Case.Opportunity__r.RecordType.Name =’proposed Recordtype’,true,false)}"> -->
<apex:pageBlocksection >
<apex:outputLabel value="space" />
<apex:inputField value="{!Case.space__c}" />
</apex:pageBlocksection>
</apex:outputPanel >
<apex:outputPanel rendered="{!IF(Case.Opportunity__r.RecordType.Name =’Intial Recordtype’,true,false)}"> -->
<apex:pageBlocksection >
<apex:outputLabel value="counter" />
<apex:inputField value="{!Case.counter__c}" />
</apex:pageBlocksection>
</apex:outputPanel >
</apex:form>
</apex:page>
<apex:page standardController="Case" showHeader="false" applyBodyTag="false" applyHtmlTag="false">
<apex:form >
<apex:outputPanel rendered="{!IF(Case.Opportunity__r.RecordType.Name =’proposed Recordtype’,true,false)}"> -->
<apex:pageBlocksection >
<apex:outputLabel value="space" />
<apex:inputField value="{!Case.space__c}" />
</apex:pageBlocksection>
</apex:outputPanel >
<apex:outputPanel rendered="{!IF(Case.Opportunity__r.RecordType.Name =’Intial Recordtype’,true,false)}"> -->
<apex:pageBlocksection >
<apex:outputLabel value="counter" />
<apex:inputField value="{!Case.counter__c}" />
</apex:pageBlocksection>
</apex:outputPanel >
</apex:form>
</apex:page>
Please put pageBlockSection under a pageBlock tag.
Link for reference : Salesforce example - Official (https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_pageBlockSection.htm)
thanks!
Thanks for giving reply. I have added pageblock even its not working am getting sysntax error