0

I have a page in which one section should be rendered when one picklist value is selected. This working fine for system admin.But for other profiles the section is not getting rendered.

<apex:pageBlockSection>
<apex:pageBlockSectionItem>
 <apex:outputLabel value="Is Address?"/>
         <apex:outputPanel >  
             <div class="requiredInput">
                <div class="requiredBlock"></div>  
                  <apex:inputField value="{!record.IsAddress__c}" >
                     <apex:actionSupport event="onchange" reRender="MyPanel" status="mystatus" />
                     <apex:actionstatus id="mystatus" startText="Loading......." startStyle="color:red"/>
                  </apex:inputField> 
             </div>
         </apex:outputPanel>
</apex:pageBlockSectionItem >
</apex:pageBlockSection >

 <apex:outputPanel id="MyPanel" >
  <apex:pageBlockSection title="Location"  rendered="{!(record.IsAddress__c__c=='Yes')}"> 
   <apex:pageBlockSectionItem >
         <apex:outputLabel value="Region"/>
         <apex:outputPanel >  
             <div class="requiredInput">
                <div class="requiredBlock"></div>  
                  <apex:inputField value="{!record.Region__c}" />
                </div>
         </apex:outputPanel>         
   </apex:pageBlockSectionItem> 

Appreciate your help!

  • Do callReport and record reference the same object? If they do, your code would be clearer if you eliminated one of the names. If they do not, then I would expect the rendering to not work for any profile. – Keith C Dec 8 '14 at 13:16
  • record.IsAddress__c__c - is this a typo? – cropredy Dec 8 '14 at 17:57
  • Yes this typo.. – SalesforceAspiration Dec 9 '14 at 9:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.