+ Start a Discussion
WesGrayWesGray 

Custom object Name field like Contacts

I have a custom object Employee which has a First Name field and a Last Name field.  I would like the "Record Name" displayed to the user everywhere for this object to be the concatenation of the First Name and Last Name field.  However, when the user enters a new Employee they should type First Name as one field and Last Name as another.  It seems to me that when I create a custom object the field name I give for the Record Name is the field that displays everywhere, but I don't see any way to make it a computed field. Is it possible to do this with a custom object? The build-in object Contact works this way, so I'm thinking there must be a way to do it.
werewolfwerewolf
Every custom object has a required Name field, but you can make that field an autonumber and just kind of ignore it.  Then you can make separate First Name and Last Name fields (and make them required), and then a Formula field with the Name label that mashes together the first and last name fields.
WesGrayWesGray
But if I do that then the Auto Number field shows up in all the places I want the full name to show up.  For example, I can't remove it from the list-view layouts or the "Recent Items" list.  The build-in Contacts object OTOH shows the full name in the list-view layous and Recent Items, even though Full Name isn't even a field on the New Contact screen.  I want to be able to do that.
werewolfwerewolf
Yeah, I don't think that behavior that you see on Contact is generalized in any meaningful sense.

What if you made Employee a record type of Contact instead?
werewolfwerewolf
Also, if they're employees is there something else you can use that Name field for, like Employee ID?  You can just reuse that Name field and relabel it to Employee ID and no one would be the wiser, and it would look perfectly natural in list views.
WesGrayWesGray
Yes, it did occur to me that I could co-opt the Contact table.  I initially dismissed the idea as a confusing design, but maybe I should reconsider it.

Thanks for confirming that I wasn't overlooking something.

roman.mroman.m

Is this possible 5 years later?

EGA FuturaEGA Futura
Maybe you can find the solution here: https://developer.salesforce.com/forums?id=906F00000008oR8IAI