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

Pick the right Length for a new custom field

Length is a one-line decision that has long-term consequences. Spend the few minutes to size it right at field-creation time.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated May 21, 2026

Length is a one-line decision that has long-term consequences. Spend the few minutes to size it right at field-creation time.

  1. Identify the data source

    Where does this field''s data come from? Customer input? External system? Computed value? Each source has typical lengths to design for.

  2. Pick a generous initial length

    Increasing later is free; decreasing is painful. Default to a length comfortably above the expected maximum.

  3. Cross-check against standard field limits

    If the field maps to a standard field downstream, match or undercut its length. Don''t make a custom Name longer than Account.Name (255).

  4. Choose Text vs. Long Text Area deliberately

    The 255 boundary is meaningful. Text is searchable and formula-friendly; Long Text Area is not. Pick based on the downstream usage.

  5. Add validation rules if needed

    For data-quality control, add a validation rule with LEN() to enforce minimum or maximum lengths beyond what the field itself enforces.

  6. Document in the data dictionary

    Record the chosen Length and the reasoning. Future admins inheriting the field will thank you.

Mandatory fields
Field Typerequired

Text, Long Text Area, Number, Currency, etc.

Lengthrequired

Maximum characters or digits.

Decimal Places (numeric)required

Precision for numeric fields.

External ID flag (text)required

Whether the field acts as an alternate key.

Unique flag (text)required

Whether the field enforces uniqueness.

Gotchas
  • Decreasing field length requires data validation. Production decreases can fail if any row exceeds the new shorter length.
  • Long Text Areas are not indexed by default. Searches against them are slow until indexing is enabled.
  • Standard field lengths cannot be changed. Integration code must respect them or DML fails with STRING_TOO_LONG.
  • Multibyte characters count as one each in LEN() but consume more bytes in storage. Database storage estimates need to account for the multibyte multiplier.

See the full Length entry

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