How can I display the user name instead of the id in the community? - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Kim RobertsKim Roberts 

How can I display the user name instead of the id in the community?

We created a custom field on the Account to capture the "Account Manager" name.  This is a lookup field to the User record.
We are trying to display that field on the Community, however, since the user is not a community member, it will not show.
We created a new custom field as a formula (text) field.  But when we view this on the Community, it displays the ID, not the name.  We tried using TEXT(Account_Manager__c) but we get a syntax error that says "Error: Incorrect parameter type for function 'TEXT()'. Expected Number, Date, DateTime, Picklist, received Lookup(User)" so I guess we cannot use this with our lookup field.

I have also tried using the Account_Manager__r.Full_Name__c field (the second option in the screen shot, then Full Name, but nothing displays.
Any thoughts on what we can try or if this can even be done?
Thanks in advance!
User-added image
Best Answer chosen by Kim Roberts
Ahilesh RagavanAhilesh Ragavan
Hello Kim,

Create a Formula(TEXT) field using this:
Account_Manager__r.FirstName+" "+Account_Manager__r.LastName

 

All Answers

Ahilesh RagavanAhilesh Ragavan
Hello Kim,

Create a Formula(TEXT) field using this:
Account_Manager__r.FirstName+" "+Account_Manager__r.LastName

 
This was selected as the best answer
Kim RobertsKim Roberts
Thank you so much - I can't believe it was that easy!  Danced all around it but did not think first + last would give a different result than full name!