+ Start a Discussion
LisaHaigyLisaHaigy 

Help with hiding a field for certain profiles on a VFP

I am new to VFP and need to hide a field for certain profiles and not sure how or where to put the restriction.  Below is the field I need to hide.

<apex:pageBlockSectionItem id="AccessSI" >  
                            <apex:outputLabel value="Access" for="Access" />
                            <apex:outputPanel styleClass="requiredInput" layout="block">
                                <apex:outputPanel styleClass="requiredBlock" layout="block"/>
                                <apex:inputField value="{!Call.Access_del__c}" id="access">
                                <apex:actionSupport event="onchange" action="{!outcomecheck}" reRender="koc,kocbar,buttons,kocselect" />
                                </apex:inputField>
                            </apex:outputPanel>
                        </apex:pageBlockSectionItem> 
Nishant Prajapati 10Nishant Prajapati 10
Hi,
Check the FLS for the field using ObjectType global variable on VF Page.
For example,
<apex:outputText value="{!contactName}" 
             rendered="{!$ObjectType.Contact.fields.Name.Accessible}" />