2

I want to show fields only for Profiles 'Legal' or 'System Administrator'. How can I change this code so that it work properly? I have this code (syntax error):

     <apex:pageBlockSection id="onlyForLegal" rendered="{!IF($Profile.Name =='Legal', true , false) OR !IF($Profile.Name =='euN Legal', true , false)}">
           <apex:inputField value="Object__c.Field__c'/>
     </apex:pageBlockSection>

1 Answer 1

4

You don't need the IF function here.

<apex:pageBlockSection id="onlyForLegal"
    rendered="{!
        OR(
             $Profile.Name = 'Legal', 
             $Profile.Name = 'System Administrator'
        )}">

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .