While creating a custom field, we should specify the data type. A data type is a way of classifying data. In This article, we are going to learn about the Data types for creating custom fields.
Auto Number
The sequence number will be generated automatically by a system. For Auto numbers, we can define the display format. For each new record, the number is automatically incremented.
Formula
A read-only field whose value is determined by a formula expression that we specify. When any of the source fields change, the formula field is changed.
Roll-Up Summary
A read-only field that shows the sum, minimum, or maximum value of a field in a related list, as well as the total number of records in the associated list.
Lookup Relationship
A lookup relationship creates the links between two objects. The value of one field is determined by the value of another field in another object.
Master-Detail Relationship
It creates the relationship between two objects as parent and kid. One object will be (child or “detail”), while the other will be (parent or “master)
- On all detail records, the relationship field is required.
- The master record determines who owns and who can share a detail record.
- When a user deletes the master record, it also deletes all detail records.
- To summarise the detail records, we can build rollup summary fields on the master record.
External Lookup Relationship
Creates a connection between this object and an external object whose data is stored outside of the Salesforce org.
Checkbox
Allows users to choose whether a value is True (checked) or False (unchecked).
Currency
Allows users to type in a dollar or other currency amount, and the field is formatted as a currency amount automatically. If you’re exporting data to Excel or another spreadsheet, this can actually be useful.
Date
Simply type in a date or choose one from a popup calendar.
Date/Time
Users can either type in a date and time or choose a date from a popup calendar. The date and time are inserted into the Date/Time box when users click a date in the pop-up.
Allows users to enter an email address, which is subsequently validated for accuracy. If this field is specified for a contact or lead, users can specify the address when selecting Send an Email. In mass emails, custom email addresses are not authorized.
Geolocation
Users can specify locations. It may be used to calculate distance because it has latitude and longitude components.
Number
Allows users to type in any number they want. The leading zeros have been eliminated.
Percent
Allows users to type in a percentage figure, such as ’10,’ and the percent sign will be added automatically.
Phone
Users can input any phone number they like. It is formatted into a phone number automatically.
Picklist
Allows users to select a value from a list of options.
Picklist (Multi-Select)
Allows users to choose multiple values from a predefined list.
Text
Allows users to insert any letter and number combination.
Text Area
Users can type up to 255 characters on separate lines.
Text Area (Long)
On separate lines, users can enter up to 131,072 characters.
Text Area (Rich)
Users can type in formatted text, add photos, and hyperlinks. Separate lines can contain up to 131,072 characters.
Text (Encrypted)
Allows users to enter any combination of characters and numbers and encrypt them.
Time
Allows users to input a time in their own time zone. This field accepts times like “2:40 PM,” “14:40,” “14:40:00,” and “14:40:50.600.”
URL
Users can type in any valid website address. The URL will open in a new browser window when users click on the field.