First let's define a few text fields. We already created a basic text field for Position Title when we defined our Position custom object. Looking at our screenshot, the only text fields that remain are the text fields under the Description heading. We'll start by defining the Job Description field.
Every time you create a custom field, you'll first choose a data type from the field type selection page.
Since job descriptions can be lengthy, let's choose a long text area.
The second page of the custom field wizard allows us to enter details about our long text area field. The fields that appear in this step change depending on the data type that we selected in the previous page.
Like the other labels we've seen in the platform so far, Field Label specifies the text that appears when the field is rendered in the user interface. Notice that when we enter a value for Field Label, Field Name is automatically populated with the same text but with all spaces and punctuation replaced by underscores. The value for Field Name is a unique name that is used to refer to the field when writing a custom formula or using the API.
The Length field allows us to restrict the maximum number of characters that are allowed. Since we don't get any benefit from this kind of restriction, leave this value set to 32,768.
This field allows us to specify how large our text box will appear on the page.
While the description is displayed only in the details for this custom field in Setup, this help text is displayed on record detail and edit pages when users hover over the field's label. Its purpose is to assist users in filling out the field correctly. It's optional to add help text for a field, but it's a good idea if you have fields that you think might confuse users.
There's no obvious default value for a text field, so just leave Default Value blank.
The third page of the Custom Field wizard allows us to restrict access to this field from certain user profiles. We'll learn more about profiles and field-level security in Securing and Sharing Data, so for now, just accept the defaults.
The last page of the wizard allows us to automatically place our field on the Position page layout. Again, we'll learn about page layouts in the next chapter, so for now, just accept the defaults.
|Data Type||Field Label||Length||# Visible Lines||Default Value|
|Text Area (Long)||Responsibilities||32,768||3||Leave unspecified|
|Text Area (Long)||Skills Required||32,768||3||Leave unspecified|
|Text Area (Long)||Educational Requirements||32,768||3||Leave unspecified|
Now that we've wet our feet with text fields, let's quickly create a few more fields of other types. You'll find that with few exceptions, they're all very similar to one another.