Salesforce is a compelling customer relationship management (CRM) tool that helps businesses track their customers, sales, and marketing campaigns. One of Salesforce’s key features is its ability to store and manage data. However, not all data is created equal. In Salesforce, data is divided into three types: Read Only, Relationship, and Generic. This blog post will closely examine these data types and what they mean for your business.
Read Only Data Types
Auto Number Fields
Auto Number fields are system-generated sequence numbers automatically incremented for each new record. They assign a unique number to each record, which can be customized to include a prefix or suffix text. Auto Number fields are not available for external objects.
Formula Fields
Formula fields are read-only fields that derive value from a formula expression you define. They are updated when source fields change, giving you control over how your data is displayed. Formula fields are not available for external objects.
Roll-Up Summary Fields
Roll-up summary fields automatically display the record count of related records or calculate the sum, minimum, or maximum value of associated records. These 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. Roll-up summary fields are not available for external objects.
Relationship Data Types
Hierarchical Relationship Fields
Hierarchical Relationship fields create a hierarchical lookup relationship between users. This allows users to use a lookup field to associate one user with another that neither directly nor indirectly refers to itself. For example, you can create a custom hierarchical relationship field to store each user’s direct manager.
Indirect Lookup Relationship Fields
Indirect Lookup Relationship fields link a child’s 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 and child object fields 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 Fields
Lookup Relationship fields create 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. A lookup relationship on a standard or custom object creates a field that allows users to click a lookup icon and select another record from a window. The lookup relationship field on an external object references 18-character Salesforce IDs stored in an external data source. Those IDs are matched against the parent object to determine which records are related to each other.
Master-Detail Relationship Fields
Master-detail relationship fields create a relationship between records where the master record controls certain behaviors of the detail record, such as record deletion and security. Master-detail relationships can’t be used with campaign members.
External Lookup Relationship Fields
External Lookup Relationship fields create a relationship that links this object to an external object whose data is stored outside the Salesforce org. 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.
Generic Data Types
Checkbox
A checkbox allows users to check a box, indicating a true (checked) or false (unchecked) 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
Allows users to enter a currency amount. The system automatically formats the field as a currency amount. This formatting is helpful if you export data to a spreadsheet application. It is not available for external objects.
Date
Allows users to enter or pick a date from a popup calendar.
Date/Time
Allows users to enter a date or pick a date from a popup calendar and enter a time of day. Visual and behavioral differences exist between the 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. Using any custom date field in reports, you can limit the data by specific dates and times.
This field allows users to enter an email address of up to 80 characters, which is validated to ensure proper format. Users can choose the address when clicking Send an Email if this field is specified for a contact or lead.
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.
Geolocation
It allows users to specify a location by its latitude and longitude and can be used to calculate distance. 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. It is not available for external objects.
Number
Allows users to enter any number. Leading zeros are removed. 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
Allows users to enter a percentage number as a decimal—for example, 0.10. The system automatically converts the decimal to a percentage—for example, 10%.
Phone
Allows users to enter any phone number. The 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 not using a custom phone field for fax numbers.
Picklist
Let 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)
Allows users to 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.
Text
Allows users to enter any combination of letters, numbers, or symbols. You can set a maximum length of up to 255 characters.
Text Area
Allows users to enter up to 255 characters that display on separate lines similar to a Description field.
Text Area (Long)
Allows users to enter up to 1,31,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 1,31,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. These two characters count toward the 1,31,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. The entire field is available if you download the report as Details Only.
Text Area (Rich)
Users can format the content of a field with the help of a toolbar and can even add images and hyperlinks. This toolbar provides options for undo, redo, bold, italicize, underline, strikeout, hyperlink, upload or link to an image, modify alignment, add a numbered or non-numbered list, indent, and outdent. The maximum size of a field is 1,31,072 characters, which includes all the formatting and HTML tags. When generating a report, only the first 999 characters in a standard rich text area or a long text area are displayed. In the case of custom fields, only the first 255 characters are displayed. However, the entire field can be viewed if you download the report as Details Only. The maximum size for uploaded images is 1 MB, and only GIF, JPEG, and PNG file types are supported. External objects are not supported. It should be noted that there are visual and formatting differences between rich text areas in Lightning Experience and the Salesforce mobile app compared to Salesforce Classic.
Text (Encrypted)
Users can input any combination of letters, numbers, or symbols and store them in encrypted form. The maximum length that can be set is 175 characters. Encrypted fields are secured using 128-bit master keys and the Advanced Encryption Standard (AES) algorithm. You can archive, delete, and import your master encryption key. If you wish to manage your master encryption key, you can contact Salesforce to enable this feature. Note that it is not available for external objects.
Time
Allows users to enter a time of day, including hours, minutes, seconds, and milliseconds. Append a “Z” at the end to denote Greenwich Mean Time (GMT).17:30:45.125, 17:30:45, 17:30, and 17:30:45Z are all examples of valid entries. The time is displayed 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
This feature allows users to input a valid website address of up to 255 characters. However, only the first 50 characters will be displayed on the record detail pages. When the user clicks on the field in Salesforce Classic, the URL will open in a separate browser window. In Lightning Experience, internal URLs will open in the same window, whereas external URLs will open in a separate browser window. The URL will open in a new workspace tab if you use a Salesforce console app. For Lightning console apps, internal URLs will open in a new workspace tab, and external URLs will open in a separate browser window.
Takeaway Points
- Salesforce is a CRM tool that helps businesses track their customers, sales, and marketing campaigns.
- Data in Salesforce is divided into three types: Read Only, Relationship, and Generic.
- Read-only data types include Auto Number Fields, Formula Fields, and Roll-Up Summary Fields.
- Relationship data types include Hierarchical Relationship Fields, Indirect Lookup Relationship Fields, Lookup Relationship Fields, Master-Detail Relationship Fields, and External Lookup Relationship Fields.
- Generic data type includes the following
- Checkbox fields indicate a true or false attribute of a record.
- Currency fields allow users to enter a currency amount and are automatically formatted by the system.
- Date fields allow users to enter or pick a date from a popup calendar.
- Date/Time fields allow users to enter a date or pick a date from a popup calendar and enter a time of day.
- Email fields allow users to enter an email address of up to 80 characters, which is validated to ensure proper format.
- Geolocation fields allow users to specify a location by its latitude and longitude and can be used to calculate distance.
- Number fields allow users to enter any number.
- Percent fields allow users to enter a percentage number as a decimal, which is automatically converted by the system.
- Phone fields allow users to enter any phone number, and the system automatically formatted them.
- Picklist fields let users select a single value from a list that you define.
- Picklist (Multi-Select) fields allow users to select more than one picklist value from a list that you define.
- Text fields allow users to enter any combination of letters, numbers, or symbols.
- Text Area fields allow users to enter up to 255 characters that display on separate lines, similar to a Description field.
- Text Area (Long) fields allow users to enter up to 1,31,072 characters displayed on separate lines, similar to a Description field.
- Text Area (Rich) fields allow users to format the content of a field with the help of a toolbar and can even add images and hyperlinks.
- Text (Encrypted) can store encrypted data of up to 175 characters, secured by 128-bit master keys and the AES algorithm. The master encryption key can be archived, deleted, and imported, and its management can be enabled upon request to Salesforce.
- Time can be entered in different formats and displayed in 12-hour notation with AM or PM, depending on the Locale setting on the Company Information page in Setup.
- URLs of up to 255 characters can be input, with only the first 50 characters displayed on record detail pages.
In conclusion, Salesforce is a potent tool for helping businesses manage their customers, sales, and marketing campaigns. By understanding the different data types available in Salesforce, you can ensure your data is organized and managed effectively. Whether you’re using read-only, relationship, or generic data types, each has its unique purpose and function. So, take the time to explore these data types and use them to their full potential.