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
lilolilo 

Record name size

Hello
I am force.com newbie trying to learn.

In designing my first custom objects, I noticed that Record name field, when selected to be in format Text
automatically assigns size of 80.

Is there any way to create Custom Objects with size different than default one (80)

Thanks in advance


aalbertaalbert
The standard Name field on a custom object, if defined as Text, will default to 80 characters.
But custom fields can be defined as Text (up to 255 characters), Text Area (up to 255 characters in separate lines), Long Text Area (up to 32,000 characters).

If the 80 character limit on the standard name field is a concern, you could set the Name field as AutoNumber. Then go create a custom text field, and call it something like "Name".


lilolilo
Thanks
I think the functionality whereby Record Name field is always shown and searchable is a big plus, hence i was hoping to be able to extend it to acommodate text longer (but within reasonable limits) than 80 chars

aalbertaalbert
Yes, I fully agree that there are many benefits to using the standard Name field.
But if forced to use a custom field, due to size limitations, you can configure the Search layouts, Tab layouts, related lists, ect to show the custom field and not the standard field (or both).
lilolilo
Thanks a lot for your feedback
MarkSilberMarkSilber
There will be some areas where you won't be able to hide the original "Name" field. In addition, if you create new field to store a longer name, it won't be clickable as hyperlink -- only the Name field will be. There are ways around this, including creating a formula field that takes the new field and makes it a hyperlink that will open the record and then exposing this new formula field in all your search results / views / reports, etc.

You should also mark the new field as an external key field so it's searchable from the side bar search without having to do an advanced search.

Mark
lilolilo
Thanks
<<You should also mark the new field as an external key field so it's searchable from the side bar search without having to do an advanced search.>>

I read about this as well, but unless i am doing something obviously wrong, marking the new field as ExternalID does not make it searchable via searchbar