+ Start a Discussion
Andrea SloanAndrea Sloan 

Creating a List view visualForce page with a Filter

I've  created a visualForce page which pulls a list of all my Salesforce users with a few fields included. I need help with two things.
1. The profile in the list view pops up as the CRM ID. This is not helpful for my user to view it this way. How can I get the profile that includes the field Profile to display by the label name of the actual profile and not the code?

2. I need to add a filter to my list view to ensure it only displays Active Salesforce users. Can someone help me as to how and where I should be including this? I'm pasting my current code below

3. The reason behind this Visual Force creation is to allow my Trainer access to this user information as she does not have permission access to the actual user page. Once my VisualForce is done, how do I ensure that she could have access to this data? Is there something I need to add to the coding of this visual force page to ensure she could access it even though she has no access to the user object - based on her profile? Also, where would I display this VisualForce page for her to view? I cannot think of any current object where this would be apropriate to place for her as part of a page layout unless I create a new object just to place this for her? Or would a link on the home page work?

<apex:page standardcontroller="User" recordSetvar="Users">


 <apex:pageBlock title="List of Users">
    <apex:pageBlockTable value="{!Users}" var="listofusers" >
    
        <apex:column headerValue="Name">
            {!listofusers.Full_Name__c}  
        </apex:column>
         <apex:column headerValue="Office">
            {!listofusers.UserRegionalClassification__c}  
        </apex:column>
         <apex:column headerValue="Profile">
            {!listofusers.Profile}  
        </apex:column>
        
        
        <apex:column headerValue="Time Zone ">
           {!listofusers.TimeZoneSidKey}
        </apex:column>  
        <apex:column headerValue="Email Address ">
           {!listofusers.Email}
        </apex:column>  
        
          
        <apex:column headerValue="Account Owner ">
           {!listofusers.Account_Owner__c}
        </apex:column>      
    </apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Scott Shapiro 27Scott Shapiro 27
I'm 99% sure if they don't have access to the core data, then they won't be able to see it in a VF page either.
Andrea SloanAndrea Sloan
Assuming our trainer does get access to the user object, can you help me answer my previous questions?