You need to sign in to do that
Don't have an account?
harish garimella
display a user fiels in visualforce pages
i want to display or retrieve a user fiels in visualforce pages
fields which are in customize! users!fields
which may be standard fields or custom fields
Thanks in Advance
fields which are in customize! users!fields
which may be standard fields or custom fields
Thanks in Advance
if you intend to display User fields of current logged-in user then use it in this way:
we can create a fields for view for the user profile some extra fields we can create i need to display those fields in visualforce pages
and refer myUser in your page like:
{!myUser.name}
{!myUser.field1__c}
Contorller code:
public User us{get;set;}
public xxxx()
{
try
{
if(this.empDetail.user__c!=null)
{
us = [select title,email,department,manager.Name,phone from user where id =: userInfo.getUserID()];
}
}
catch(Exception e)
{
ApexPages.addMessages(e);
}
}
Page:
<apex:outputText id="phone" value="{!us.Phone}" />
<apex:outputText id="email" value="{!us.email}" />
<apex:outputText id="name" value="{!us.name}" />
<apex:outputText id="profile" value="{!us.ProfileId}" />
Hope this answered your question.
Thanks,
Praveen Murugesan