Data Types and Field Types in Salesforce — Let Create An App

In this tutorial, we are going to learn about different types of Data types in Salesforce and Field types in Salesforce.
Every field should belong to one of the Data types which means before creating any of the fields there data type must be defined.
Generally, there are 5 types of Data Types.
- ID
- String
- Boolean
- Double
- Varies by types
Data Type in Salesforce
Data Types in Salesforce
Id
It is basically a unique alphanumeric string in the organization which can be uniquely identified. This string can not be used again to associate with another record.
String
The string is a sequence of characters.
Boolean
The boolean data type is used to store two possible values either TRUE or FALSE.
Double
The double data type is used to store floating point data like any currency conversion rate etc.
Varies by Type
This kind of data type can change their type as per the results like the Formula field.
Field Types in Salesforce
Auto Number
When the data type of any field is selected as an Auto Number then the system will automatically generate the sequence number that uses a certain display format that we define. Auto-generated numbers will increase automatically for every record we create.
Formula
The formula field is used to derive the values on the bases of different expressions. The result of the expression will store in the Formula Field. The formula field will update every time whenever there is a change in the source field. It is a read-only field
Roll-up summaries
Roll-up summaries are the fields by which we can make a mathematical calculation like Sum, Min, Max, and Count values of all the related fields on the parent record. This field is also read-only.
Lookup Relationship
This data type links two objects. We can link one object to another object by lookup the relationship. Users can select any record created in the other object. This kind of relationship doesn’t follow the cascade-delete rule.
Master-Detail Relationship
This field type is also used to create links between two objects, but this creates a special kind of parent-child relationship between the objects means if the parent gets deleted, all child of that object also gets deleted.
Checkbox
If we need functionality to either select TRUE or FALSE, then checkbox data type will use.
Currency
The currency data type allows the user to take currency in currency format.
Date
Allow the user to enter the date, or the user can select the date from the date picker dialog.
Date/Time
Allow the user to enter the date and time, or the user can select the date & time from the date picker & time picker dialog.
Allows users to enter an email address, which is validated to ensure proper format.
Geolocation
Allows users to define locations. Includes latitude and longitude components, and can be used to calculate distance.
Number
Allows users to enter any number. Leading zeros are removed.
Percent
Allows users to enter a percentage number, for example, ’10’ and automatically adds the percent sign to the number.
Phone
Allows users to enter any phone number. Automatically formats it as a phone number.
Picklist
Allows users to select a value from a list you define.
Picklist (Multi-Select)
Allows users to select multiple values from a list you define.
Text
Allows users to enter any combination of letters and numbers
Text Area
Allows users to enter up to 255 characters on separate lines
Text Area (Long)
Allows users to enter up to 131,072 characters on separate lines
Text Area (Rich)
Allows users to enter formatted text, and add images and links. Up to 131,072 characters on separate lines.
Text (Encrypted)
Allows users to enter any combination of letters and numbers and store them in encrypted form.
Time
Allows users to enter a local time. For example, “2:40 PM”, “14:40”, “14:40:00”, and “14:40:50.600” are all valid times for this field.
URL
Allows users to enter any valid website address. When users click on the field, the URL will open in a separate browser window.
All the data in the salesforce must from any of the types which are mentioned above. Whenever we will create a custom object in Salesforce, we will use to create field from one of the above type.
I hope you like this tutorial and if you want any help let me know in the comment section.
Stay tuned, there is way more to come! follow me on Youtube, Instagram, Twitter, and LinkedIn. So you don’t miss out on all future Articles and Video tutorials.
. . .
I am delighted that you read my article! If you have any suggestions do let me know! I’d love to hear from you. ????
Shubham Agarwal is a passionate and technical-driven professional with 5+ years of experience in multiple domains like Salesforce, and iOS Mobile Application Development. He also provides training in both domains, So if you looking for someone to provide you with a basic to advance understanding of any of the domains feel free to contact him

Originally published at https://letcreateanapp.com on January 11, 2023.