+ Start a Discussion
Jo_DengJo_Deng 

How to display customer portal user's user name on the contact page?

I would like to display the customer portal username for our contacts on the contact page, so a user with no access to the user record can see the username for their contact.  I tried adding a formula field with this field:

 

Associated_User__r.Username & Associated_User__c

 

It displayed nothing for an active customer portal contact record. 

 

SFDC gurus, how would I be able to accomplish this?  Any way through configuration?

hemantgarghemantgarg

You can use "$User" global variable directly on vf page like : $User.username , it will display username of current logged-in user. is it what you are looking for ?

Jo_DengJo_Deng

Hi Hemantgarg, $User.username displays the user name of the current SFDC user (myself logged in to SFDC).  I need the user name for a customer portal user, who is associated to a contact record.  I need the contact record associated customer portal user's username displayed on the contact page.