Loading
Salesforce now sends email only from verified domains. Read More
Extend Salesforce with Clicks, Not Code
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Custom Field Types

          Custom Field Types

          Salesforce supports various field types, allowing you to select the right one for your data. You can also convert an existing field to a different data type if needed.. When you have data that doesn’t match any of the standard fields, your admin can create a custom field for that data. For example, create a Middle Name field for contacts to capture additional information.

          Important
          Important Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

          The first step in creating a custom field is to choose the type of the field. This table includes a description of each custom field type.

          Type Description
          Address Lets users enter a street, city, state or province, zip or postal code, and country, or to search for an address with an external tool. When a user selects an address using the tool, the street, city, state or province, zip or postal code, and country are populated.
          Auto Number Automatically assigns a unique number to each record. The maximum length of any auto-number field is 30 characters, 20 of which are reserved for prefix or suffix text. Not available for external objects.
          Checkbox Lets users check a box, indicating a true or false attribute of a record. When using a checkbox field for a report or list view filter, use “True” for checked values and “False” for unchecked values. The Data Import Wizard and the weekly export tool use “1” for checked values and “0” for unchecked values.
          Currency

          Lets users enter a currency amount. The system automatically formats the field as a currency amount. This formatting is useful if you export data to a spreadsheet application. Not available for external objects.

          The way Salesforce rounds a currency custom field value depends on the number of decimal places (number of digits to the right of the decimal point) defined for the field.

          • If the number of decimal places is zero (no decimal values) so that the field can contain only whole numbers with no digits to the right of the decimal point, Salesforce uses truncation rounding. All numbers to the right of the decimal point are removed.
            • 23.5 becomes 23
            • -23.5 becomes -23
            • -23.9999999 becomes -23
          • If the number of decimal places is 1 or greater (1 or more decimal values), Salesforce uses half-away-from-zero rounding.
            • If the custom field is defined with 1 decimal place:
              • -13.55 becomes -13.6
              • 23.44 becomes 23.4
              • 36.77 becomes 36.8
            • If the custom field is defined with 4 decimal places:
              • -14.55555 becomes -14.5556
              • 27.59994 becomes 27.5999

          Values lose precision after 15 decimal places.

          Date Lets users enter a date or pick a date from a popup calendar. In reports, you can limit the data by specific dates using any custom date field.
          Date/Time Lets users enter a date or pick a date from a popup calendar and enter a time of day. There are visual and behavioral differences for Date/Time fields in Lightning Experience and Salesforce Classic. In Lightning Experience, the date and time fields are separate, and the initial time is set to 12:00 PM when you select a date in the calendar. In Salesforce Classic, the date/time field is a single field. You can set the field to the current date and time by clicking the date and time link next to the field. The time of day includes AM or PM notation. In reports, you can limit the data by specific dates and times using any custom date field.
          Email

          Lets users enter an email address of up to 80 characters, which is validated to ensure proper format. If this field is specified for contacts or leads, users can choose the address when clicking Send an Email.

          You can't use custom email addresses for mass emails or list emails.

          Emails sent to a record's custom email address fields aren't logged against that record.

          This field can be encrypted using Shield Platform Encryption.

          External Lookup Relationship When you create an external lookup relationship field, the standard External ID field on the parent external object is matched against the values of the child’s external lookup relationship field. External object field values come from an external data source.
          Formula

          Lets users automatically calculate values based on other values or fields such as merge fields. Not available for external objects.

          Salesforce uses the round half up tie-breaking rule for numbers in formula fields. For example, 12.345 becomes 12.35 and −12.345 becomes −12.35.

          Geolocation Lets users specify a location by its latitude and longitude. Geolocation is a compound field that counts toward your org’s limits as three custom fields: one for latitude, one for longitude, and one for internal use. Not available for external objects.
          Hierarchical Relationship Creates a hierarchical lookup relationship between users. Lets users use a lookup field to associate one user with another that doesn’t directly or indirectly refers to itself. For example, you can create a custom hierarchical relationship field to store each user's direct manager.
          Indirect Lookup Relationship An indirect lookup relationship links a child external object to a parent standard or custom object. When you create an indirect lookup relationship field on an external object, you specify the parent object field and the child object field to match and associate records in the relationship. Specifically, you select a custom unique, external ID field on the parent object to match against the child’s indirect lookup relationship field. The child lookup field’s value comes from an external data source.
          Lookup Relationship

          Creates a relationship between two records so you can associate them with each other. For example, opportunities have a lookup relationship with cases that lets you associate a particular case with an opportunity.

          • On a standard or custom object, a lookup relationship creates a field that allows users to click a lookup icon and select another record from a window.
          • On an external object, the lookup relationship field references 18-character Salesforce IDs that are stored in an external data source. Those IDs are matched against the parent object to determine which records are related to each other.

          On the parent record, you can display a related list to show all the records that are linked to it. You can create lookup relationship fields that link to users, standard objects, or custom objects. If a lookup field references a record that has been deleted, Salesforce clears the value of the lookup field by default. Alternatively, you can choose to prevent records from being deleted if they’re in a lookup relationship.

          Lookup relationship fields aren’t available in Personal Edition.

          Lookup relationship fields to campaign members aren’t available; however, lookup relationship fields from campaign members to standard or custom objects are available.

          Master-Detail Relationship

          Creates a relationship between records where the main record controls certain behaviors of the detail record such as record deletion and security.

          Not available for standard objects or external objects, although you can create a master-detail relationship field on a custom object that links to a standard object.

          Master-detail relationships can’t be used with campaign members.

          Number

          Lets users enter any number. This number is treated as a real number and any leading zeros are removed.

          Salesforce uses half-away-from-zero rounding for number fields. Examples:

          • 12.345 becomes 12.35
          • -12.345 becomes -12.35
          • -12.343 becomes -12.34
          • -12.347 becomes -12.35
          • 13.5 becomes 14
          • -13.5 becomes -14

          Salesforce rounds numbers referenced in merge fields according to the user’s locale, not the number of decimal spaces specified in the number field configuration.

          When you use Einstein Prediction Builder to build a prediction, a custom field is created for storing and displaying the prediction scores on records. Or, you can manually create a predictive custom field, enable it as an AI prediction field, and enter its name and label when building a prediction in Einstein Prediction Builder. For example, to display how likely a customer is to pay an invoice on time.

          In Lightning Experience, custom objects can store more decimal places than you define. If you enter 90.678 on a field that accepts 2 decimal places, the number is displayed as 90.68 on the record form. When you inline edit, the field shows the original input, 90.678. Similarly, the value is stored as 90.678 in the database. In Salesforce Classic, the input 90.678 is saved as 90.68.

          Percent

          Lets users enter a percentage number as a decimal—for example, 0.10. The system automatically converts the decimal to a percentage—for example, 10%

          Values lose precision after 15 decimal places. Also, if you enter a value with more than 15 decimal places and add a percent sign to the number, a runtime error occurs.

          Phone

          Lets users enter any phone number. Character limit is 40.

          Salesforce automatically formats it as a phone number.

          If you use Salesforce CRM Call Center, custom phone fields are displayed with the Click-to-dial button, allowing click-to-dial functionality. Therefore, Salesforce recommends that you don’t use a custom phone field for fax numbers.

          This field can be encrypted using Shield Platform Encryption.

          Picklist Lets users select a single value from a list that you define. Available for external objects only with the cross-org adapter for Salesforce Connect.
          Picklist (Multi-select) Lets users select more than one picklist value from a list that you define. These fields display each value separated by a semicolon. Available for external objects only with the cross-org adapter for Salesforce Connect.
          Roll-Up Summary Automatically displays the record count of related records or calculates the sum, minimum, or maximum value of related records. The records must be directly related to the selected record and on the detail side of a custom master-detail relationship with the object that contains the roll-up summary field. For example, a custom field called “Total Number of Guests” displays the number of guest custom object records in the Guests related list. Not available for external objects.
          Text

          Lets users enter any combination of letters, numbers, or symbols. You can set a maximum length, up to 255 characters.

          This field can be encrypted using Shield Platform Encryption.

          Text (Encrypted)

          Lets users enter any combination of letters, numbers, or symbols that are stored in encrypted form. You can set a maximum length of up to 175 characters. Encrypted fields are encrypted with 128-bit master keys and use the Advanced Encryption Standard (AES) algorithm. You can archive, delete, and import your master encryption key. To enable master encryption key management, contact Salesforce. Not available for external objects.

          This field can be encrypted using Classic Encryption. If your org uses Shield Platform Encryption, use Text to create an encrypted text field.

          Text Area Lets users enter up to 255 characters that display on separate lines similar to a Description field.
          Text Area (Long)

          Lets users enter up to 131,072 characters that display on separate lines similar to a Description field. You can set the length of this field type to a lower limit, if desired. Any length from 256 to 131,072 characters is allowed. The default is 32,768 characters. Every time you press Enter within a long text area field, a line break, and a return character are added to the text. These two characters count toward the 131,072 character limit. This data type isn’t available for activities or products on opportunities. The first 999 characters in a standard rich text area or a long text area are displayed in a report. For custom fields, only the first 255 characters are displayed. If you download the report as Details Only, the entire field is available.

          This field can be encrypted using Shield Platform Encryption.

          Text Area (Rich) With the use of a toolbar, users can format the field content and add images and hyperlinks. The toolbar allows the user to undo, redo, bold, italicize, underline, strike-out, add a hyperlink, upload or link to an image, modify alignment, add a numbered or non-numbered list, indent, and outdent. The maximum field size is 131,072 characters, inclusive of all the formatting and HTML tags. The first 999 characters in a standard rich text area or a long text area are displayed in a report. For custom fields, only the first 255 characters are displayed. If you download the report as Details Only, the entire field is available. The maximum size for uploaded images is 1 MB. Only gif, jpeg, and png file types are supported. Not available for external objects. There are visual and formatting differences for rich text areas in Lightning Experience and the Salesforce mobile app, compared to Salesforce Classic.
          Time Lets users enter a time of day, including hours, minutes, seconds, and milliseconds. The time displays in a 12-hour notation with AM or PM. The displayed time depends on the Locale setting on the Company Information page in Setup.
          URL

          Lets users enter up to 255 characters of any valid website address. Only the first 50 characters are displayed on the record detail pages. When a user clicks the field in Salesforce Classic, the URL opens in a separate browser window. In Lightning Experience, internal URLs open in the same window and external URLs open in a separate browser window. In Salesforce console apps, the URL opens in a new workspace tab. In Lightning console apps, internal URLs open in a new workspace tab and external URLs open in a separate browser window.

          When opening an external URL, a message asks for the user’s permission. To prevent the window from displaying every time you open an external URL, disable your browser’s popup blocker.

          This field can be encrypted using Shield Platform Encryption.

           
          Loading
          Salesforce Help | Article