You need to sign in to do that
Don't have an account?
Mano sfdc
{!$User.Name} It shows error
Hi Experts,
In VF Pages code, {!$User.Name} It gives error.
Anyone please help me, how to fetch User object name field value into VF Page code.
Thanks in advance.
In VF Pages code, {!$User.Name} It gives error.
Anyone please help me, how to fetch User object name field value into VF Page code.
Thanks in advance.
Use this: {!$User.firstname} {!$User.lastname}
Thanks,
Pratik
P.S. If this answers you question, please mark it as "Best Answer" so it will help other community members too.
Thanks for quick reply.
But i don't want First Name and Last Name.
Because we have a field name as "NAME" in User Object.
Why we go for other?
For any custom field:
Use: {!$User.customfield__c}
Thanks,
Pratik
you are new to salesforce?
Standard Object: User
Standard Field: Name
Please see below Image.
.
Thanks,
Manohar
I know to resolve my issue with below options, but i want to get it done with visualforce page.
1. Use {!$User.FirstName} {!$User.lastName}
2. Create a custom formula field on the user (FirstName + ' ' + LastName)
3. Use a controller or extension to get; set; a variable using UserInfo.getName();
Please anyone sort-out this.
Thanks,
Manohar.