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>
4

You don't need the IF function here.

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

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.