After creating a custom object, we need to create fields to store the data in those objects. Fields are like columns in a table where we enter information or values. There are two types of fields in Salesforce: standard and custom fields.
In this Salesforce tutorial, we will learn about various Standard and Custom Fields in Salesforce. In this, we will see different types of fields and data types, their purpose, and how to create custom fields in objects.
In Salesforce, a Field takes input from the user according to the data type and stores the data within the object. Different types of standard fields store different data types. For example, a text field stores data like Name, Address, city, etc. Some complex data fields are calculated using other field values from the same object or a related one.
Standard Fields and Custom Fields in Salesforce
Below, I have explained the definition of standard and custom fields in Salesforce so that you will easily understand the difference between them.
Standard Fields in Salesforce
The standard fields are created by Salesforce, which means these are prebuilt. If you open any standard app there, you can see different fields that have already been created as standard fields. We cannot delete the standard fields or change the field type.
Custom Fields in Salesforce
Custom fields are user-defined fields that are created according to the business requirements using available data types. For example, we can create a custom text field. We can create custom files in custom objects as well as standard objects.
Moreover, this field type can be used to store information in a particular field of an object, such as a contact, lead, or opportunity. It also decides the type of data that can be entered into the field.
Types of Fields in Salesforce
In Salesforce, each field has a defined data type. When we create the Salesforce field, we are prompted to select its data type, such as text area, picklist, number, etc.
| Salesforce Field Type | Description |
| Auto Number | The auto number field type is generated by a system-generated series number that uses a predefined display format we define, and auto-generated numbers can be incremented for every record we create. |
| Formula | The formula field is read-only, and the user can use the function, insert operators, and insert a field to make the formula. The values of the formula field can be calculated from expressions we define. |
| Roll-Up Summary | A roll-up summary field is used as a read-only field that displays the sum, maximum, and minimum values of a field in a related list. It can also be used to summarize the data of all child records and display the information on the master record. |
| Lookup Relationship | A lookup relationship is the simplest relationship we can create between two objects, in which there are no complications associated. It allows the users to select the value from a pop-up list by clicking on the lookup icon. The other object is the source of value in the list. |
| External Lookup Relationship | An external lookup relationship field type is defined as a field that is used to create a relationship that links the object to the external object whose data is stored outside Salesforce. |
| Checkbox | The date field type is defined as one that permits users to enter the date or pick a date from a pop-up calendar. |
| Currency | The currency field is used to enter a dollar and any other currency amount, and the field is automatically formatted as a currency amount. Moreover, we will focus on some practical implementation scenarios. |
| Date | The date field type is defined as one that permits the users to enter the date or pick a date from a pop-up calendar. |
| Date/Time | The date/time field type is defined as one that permits users to enter the date and time or pick a date or time. |
| The email field type is defined as one that permits users to enter an email address of up to 80 characters, which is verified to ensure the proper format. | |
| Geolocation | It is a type of field that permits users to identify the location by its latitude and longitude to calculate the distance between the locations. |
| Number | It is a type of field that permits users to enter any number. The number entered by the users is treated as a real number, and any leading zero is removed. |
| Percent | It is a type of field that permits users to enter percentage numbers. The system automatically converts the decimal number to a percentage. |
| Phone | It is a type of field that permits users to enter any phone number, and the character limit of the phone number field is 40. Salesforce automatically formats this phone field type as a phone number. |
| Picklist( Multi-Select) | It is a type of field containing much of the data on the list. This picklist can allow Salesforce users to select multiple data points from the list. |
| Text | It is a type of field that allows users to enter any combination of letters, numbers, or symbols. We can set the maximum length up to 255 characters. |
| Text Area | It is a type of field that allows users to enter up to 255 characters on a separate line, similar to the description field. |
| Text Area (Long) | This type of field allows users to enter up to 131,072 characters on a separate line. |
| Text Area (Rich) | It is a type of field that allows users to enter the formatted text and add images and links. We enter the 131,072 characters on a separate line. We can create a rich text field in any object. |
| Text (Encrypted) | It is a type of field that works as a cybersecurity functionality that allows us to view data, and the user cannot view the data without suitable permission. When our data is used, the field encryption. |
| Time | It is a type of field that is used to track time, manage time, plan events, and manage projects. |
| URL | It is a type of field that permits the user to enter a valid website address. When the user clicks on the field, the URL will open in a new browser window. |
Create a Custom Field in Salesforce
According to the business requirements, we might need to create a custom field for standard or custom Salesforce objects. To create a custom field in Salesforce, navigate to Salesforce’s setup page and follow the steps below.
- Go to the Setup and click on the Object Manager tab.
- Select the custom or standard object in which you have to create a custom field. In this example, I have selected the Account object.

- In the object setup window, click on the Fields and Relationships; in the next window, click the New button.

- Select the field type and click on the New button.

- Enter the Field Label and Field Name. To make the field required (mandatory), activate the Required checkbox. After this, click on the Next button.

- To establish the field-level security, select the profiles that can access the field, then click the Next button.

- Select the page layouts that should include this field. This field will be visible only on the selected page layouts.
After selecting the page layouts, click on the Save button.

As we click on the Save button, the custom field will be created in the selected Salesforce object and viewed in the object’s Fields and Relationships. The field will also be visible on the record page layout of the object.
This way, we can create a custom field in Salesforce custom or standard objects.
Change the Custom Field Type in Salesforce
In Salesforce, we can also modify the data type of a custom field. For example, you can change a field from Text to Text Area Long.
- To change the custom field type, click on the Object Manager tab -> Select the object with the custom field -> Fields and Relationships, -> select the custom field.
- Click on the dropdown arrow of the custom field and select Edit.

- Click on the button Change Field Type.

- Select the new field type and click on the Next button.

- Here, we can also change the field label and change the field from text to a long text area.
After this, click on the Save button.

When we click on the Save button, the custom field type will change from text to long text.

This way, we can change the custom field type in Salesforce following the above steps.
Conclusion
The Salesforce Platform enables users to customize fields according to specific business needs, allowing them to control their data effectively.
In this Salesforce tutorial, we learned about the field data types, how to create a custom field in Salesforce, and how to change the data type of a custom field in Salesforce.
Additionally, these field types can store various types of data in Salesforce. Every field type serves a specific purpose, designed to help structure and organize the data entered by users.
You may like to read:
- Salesforce Mathematical Functions
- Field Dependency in Salesforce
- How to Set Visible Lines for Text Area Long Field in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.