function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Brad HuffmanBrad Huffman 

Mimicing contact name field functionality on custom objects

I've got a custom object that is similar to a contact in that I have a required first and last name field.  I'd like to use those fields combined as the name field for the custom object.  This is similar to what occurs on the Contact object.  Problem is, the name field for custom objects is required.  Would I use a before insert/update trigger to concatenate the first/last names and set the name field on the object?  Also, if a field name is required, and a VisualForce page not containing the required field is created to override the "New" page for the object will an error be thrown?  Any ideas are appreciated.  Thanks.
devNut!devNut!
Did you try using a formula field to concatenate the contact firstname and lastname field?
Brad HuffmanBrad Huffman
Just to clarify, I'm talking about the record name field on the custom object.  I'd like to have that = the first and last name fields concatenated.