Skip to content
Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Length entry
How-to guide

How to set Length when creating a custom field

You set Length while creating a custom field in Setup. The steps below show where the attribute lives for a Text field and what each related option controls.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated Jun 16, 2026

You set Length while creating a custom field in Setup. The steps below show where the attribute lives for a Text field and what each related option controls.

  1. Open Object Manager and start a new field

    In Setup, go to Object Manager, pick the object, open Fields and Relationships, and click New. This opens the new custom field wizard.

  2. Choose the field type

    Select a type such as Text, Number, or Long Text Area. The Length input that appears next depends on the type you pick, so choose the type that matches your data first.

  3. Enter the Length value

    For Text, type a number from 1 to 255. For Long Text Area or Rich Text Area, type a limit up to 131,072. For Number, Currency, or Percent, set the total digits and decimal places.

  4. Set visibility and save

    Apply field-level security, add the field to page layouts, then save. The field is created with the Length you entered, which you can raise later from the same field detail page.

Length (Text)remember

The maximum character count for a Text field, from 1 to 255. Above 255 you must use a Long Text Area or Rich Text Area instead.

Length (Number)remember

The total number of digits for a numeric field, up to 18, split between the integer side and the decimal places you define.

Decimal Placesremember

For Number, Currency, and Percent, the count of digits shown after the decimal point. It is subtracted from the total Length to size the integer side.

Long Text Area limitremember

The character ceiling for a Long Text Area or Rich Text Area, with a default of 32,768, a minimum of 256, and a maximum of 131,072.

Gotchas
  • Decreasing a field Length is blocked if any existing record holds a value longer than the new limit, so audit data before you try to shrink a field.
  • Rich Text Area counts hidden HTML tags toward its limit, so a formatted field reaches its ceiling faster than the visible text suggests.
  • Standard field lengths are fixed and cannot be changed, so plan integrations around limits like Account.Name at 255 and Contact.LastName at 80.

See the full Length entry

Length includes the definition, worked example, deep dive, related terms, and a quiz.