Salesforce field types define what kind of value a field stores, how users enter that value, and how Salesforce can validate, calculate, report, sort, and filter it. Selecting the correct data type when creating a custom field helps protect data quality and avoids difficult field conversions later.
For example, use a Date field for a date without a time, a Currency field for monetary values, a Picklist when users must choose from controlled values, and a Lookup Relationship when a record must reference another record.
Salesforce field types at a glance
| Field category | Salesforce field types | Typical use |
|---|---|---|
| Generated and calculated | Auto Number, Formula, Roll-Up Summary | Identifiers and values calculated by Salesforce |
| Relationship | Lookup Relationship, Master-Detail Relationship, Hierarchy Relationship, External Lookup, Indirect Lookup | Connect records across objects |
| Numeric | Number, Currency, Percent | Quantities, financial amounts, and rates |
| Date and time | Date, Date/Time, Time | Calendar dates, timestamps, and time-of-day values |
| Text and contact | Text, Text Area, Text Area (Long), Text Area (Rich), Text (Encrypted), Email, Phone, URL | Names, notes, contact details, links, and sensitive text |
| Choice and logical | Checkbox, Picklist, Picklist (Multi-Select) | True-or-false values and controlled selections |
| Location | Geolocation | Latitude and longitude coordinates |
Generated and calculated Salesforce field types
- Auto Number: Generates a unique sequence value for each new record. The display format can include text, numbers, and date components. Use it for identifiers such as
INV-{00000}; do not use it when users must enter or edit the value. - Formula: A read-only field whose value is calculated from a formula expression. A Formula field can reference other fields, operators, and functions. Its return type may be Checkbox, Currency, Date, Date/Time, Number, Percent, Text, or Time, depending on the formula.
- Roll-Up Summary: A read-only field on the master record that summarizes related detail records in a master-detail relationship. A Roll-Up Summary field can count records or calculate a sum, minimum, or maximum for supported fields.
Salesforce relationship field types
- Lookup Relationship: Creates a flexible association between two objects. The child record stores a reference to the selected parent record. A Lookup Relationship field is suitable when the child can exist independently of the parent.
- Master-Detail Relationship: Creates a tightly coupled parent-child relationship. The detail record depends on the master, inherits important sharing and ownership behavior from it, and can be included in roll-up summary calculations. See how to create a Master-Detail relationship.
- Hierarchy Relationship: A special relationship available on the User object. It lets one user record refer to another user, such as an approver or functional manager.
- External Lookup Relationship: Links a child external object to a parent standard, custom, or external object by matching an external identifier.
- Indirect Lookup Relationship: Links an external object to a standard or custom object by matching a field on the external object to a unique external ID field on the parent.
Lookup versus master-detail: Choose Lookup when the related record should remain independent. Choose Master-Detail when the detail record must depend on the master and you need native roll-up summary fields. Review deletion, ownership, sharing, and existing data before choosing or converting a relationship type.
Numeric, date, and location field types in Salesforce
- Number: Stores numeric values using the precision and decimal places configured for the field. Use it for quantities, scores, measurements, and other values that participate in calculations. Leading zeros are not preserved, so identifiers such as postal codes are usually better stored as Text.
- Currency: Stores a monetary amount and displays it using the applicable currency settings. In a multi-currency org, the field works with record and corporate currency behavior. It is not limited to dollars and is not intended merely for spreadsheet export.
- Percent: Stores a numeric percentage and displays the percent symbol. Configure precision and decimal places according to the required level of detail.
- Date: Stores a calendar date without a time component. Use it for birthdays, due dates, start dates, and renewal dates.
- Date/Time: Stores both a date and a time. Salesforce displays Date/Time values according to the viewing user’s locale and time zone.
- Time: Stores a time of day without a date. Availability can depend on the object and Salesforce feature being configured.
- Geolocation: Stores latitude and longitude values. It is useful for locations, distance calculations, and location-aware business processes.
Text, contact, and web field types in Salesforce
- Text: Stores letters, numbers, and symbols in a single line. Use it for short values such as names, codes, reference numbers, and labels. Text is often the correct choice when numeric-looking data must preserve leading zeros.
- Text Area: Stores plain text across multiple lines for relatively short notes. It does not provide rich formatting.
- Text Area (Long): Stores larger amounts of plain multiline text. A custom long text area can be configured from 256 up to 131,072 characters; the default length is commonly 32,768 characters.
- Text Area (Rich): Stores formatted text and can include links, lists, and images. The configured limit can be up to 131,072 characters, and stored HTML markup counts toward that limit.
- Text (Encrypted): Stores text in encrypted form and masks it in the user interface according to permissions and configuration. Consider reporting, search, validation, integration, and encryption requirements before selecting it.
- Email: Stores an email address and checks that the value follows an email-like format. Salesforce can present the value as a clickable email link, but format validation does not prove that the mailbox exists.
- Phone: Stores telephone numbers and displays them with phone-related behavior. It is more flexible than a Number field because phone values can contain spaces, symbols, extensions, and leading zeros.
- URL: Stores a web address and displays it as a clickable link. Use Email for email addresses; URL is intended for website and resource addresses.
Checkbox and picklist field types in Salesforce
- Checkbox: Stores a Boolean value: selected means true and cleared means false. Set an appropriate default value when creating the field.
- Picklist: Presents a controlled list from which the user selects one value. Picklists improve consistency for statuses, categories, priorities, and similar values. Values can also be restricted and can vary by record type.
- Picklist (Multi-Select): Allows the user to select more than one value. Use it only when each selection genuinely belongs in one field, because multi-select picklists have limitations in formulas, reporting, automation, and integrations compared with a related child object.
How to choose the correct Salesforce custom field data type
- Identify the real value: Decide whether the data is text, a measurable number, money, a date, a controlled choice, a relationship, or a calculated result.
- Check how users enter it: Decide whether users type the value, select it, receive it from an integration, or let Salesforce calculate it.
- Review reporting and filtering needs: Long text, rich text, encrypted text, formulas, and multi-select picklists behave differently in reports, filters, and automation.
- Define validation and precision: Set field length, decimal places, required status, default value, picklist values, and validation rules based on the business requirement.
- Consider future integrations: Confirm that APIs and connected systems can send and receive the selected field type without truncation or conversion problems.
- Test security and visibility: Configure field-level security and page layouts so only the correct users can view or edit the field.
Creating a custom field in Salesforce Object Manager
- Open Setup.
- Select Object Manager.
- Open the standard or custom object.
- Select Fields & Relationships.
- Click New.
- Select the required field type and click Next.
- Enter the field label and configure the settings required by that data type.
- Set field-level security for profiles or permission sets as appropriate.
- Add the field to the required page layouts, then save it.
The exact options shown during creation depend on the field type, object, Salesforce edition, enabled features, and permissions.
Changing an existing Salesforce field type safely
Salesforce allows some custom fields to be converted to another data type, but not every conversion is available. A conversion can truncate values, remove incompatible data, break formulas or automation, alter integrations, or change reporting behavior.
- Export or back up the existing field data before conversion.
- Check formulas, validation rules, flows, Apex, reports, dashboards, list views, integrations, and mappings that reference the field.
- Confirm that existing values fit the new field’s length, precision, format, and allowed values.
- Test the conversion in a sandbox with representative records.
- Re-test permissions, page layouts, automation, reports, and integrations after the change.
For high-risk changes, creating a new field, migrating validated data, updating dependencies, and retiring the old field is often safer than converting the existing field directly.
Salesforce field type examples
| Business requirement | Recommended field type | Reason |
|---|---|---|
| Customer account website | URL | Stores and displays a clickable web address |
| Invoice amount | Currency | Supports monetary formatting and calculations |
| Contract renewal day | Date | No time component is required |
| Meeting start timestamp | Date/Time | Both date and time are required |
| Customer consent | Checkbox | Represents a true-or-false state |
| Case priority | Picklist | Limits users to approved values |
| Postal code with leading zero | Text | Preserves formatting and is not used for arithmetic |
| Related supplier record | Lookup Relationship | References another record without requiring dependent ownership |
| Total value of detail records | Roll-Up Summary | Aggregates supported values through a master-detail relationship |
Frequently asked questions about Salesforce field types
What are the main Salesforce custom field types?
The main groups are generated and calculated fields, relationship fields, numeric fields, date and time fields, text and contact fields, checkbox and picklist fields, and geolocation fields. The exact types available depend on the object and enabled Salesforce features.
What is the difference between a field type and a field format?
A field type controls how Salesforce stores and processes a value. Formatting controls how that value is displayed or entered. For example, Currency is a numeric field type with monetary display behavior, while a Text field can contain digits but is not treated as a number for arithmetic.
Should a phone number or postal code use the Number field type?
No. Phone numbers and postal codes are identifiers rather than quantities. Use Phone for telephone values and Text for postal codes so spaces, symbols, extensions, and leading zeros are preserved.
Can a Salesforce custom field data type be changed later?
Some custom field types can be converted, but available conversions and risks vary. Existing data can be truncated or lost, and dependent formulas, automation, reports, and integrations can be affected. Back up the data and test the change in a sandbox first.
When should a multi-select picklist be avoided?
Avoid it when selected values require their own attributes, reporting, automation, ordering, or relationship behavior. In those cases, a related child object usually provides a cleaner data model.
Salesforce field type editorial QA checklist
- Verify that each field description matches current Salesforce behavior and does not confuse storage type with display format.
- Confirm that URL is described as a web-address field and Email as an email-address field.
- Confirm that roll-up summaries are tied to supported master-detail relationships and list COUNT, SUM, MIN, and MAX accurately.
- Check that long and rich text limits are presented as configurable limits rather than fixed values for every field.
- Review Lookup and Master-Detail guidance for ownership, deletion, sharing, and record dependency implications.
- Ensure examples preserve identifiers such as phone numbers and postal codes as Phone or Text instead of Number.
- Recheck field availability against the target object’s Salesforce edition, enabled features, and permissions.
TutorialKart.com