Standard and Custom Fields in Salesforce

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 TypeDescription
Auto NumberThe 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.
FormulaThe 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 SummaryA 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 RelationshipA 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 RelationshipAn 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.
CheckboxThe date field type is defined as one that permits users to enter the date or pick a date from a pop-up calendar. 
CurrencyThe 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.
DateThe 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/TimeThe date/time field type is defined as one that permits users to enter the date and time or pick a date or time. 
EmailThe 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.
GeolocationIt is a type of field that permits users to identify the location by its latitude and longitude to calculate the distance between the locations.
NumberIt 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.
PercentIt is a type of field that permits users to enter percentage numbers. The system automatically converts the decimal number to a percentage.
PhoneIt 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 AreaIt 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.
TimeIt is a type of field that is used to track time, manage time, plan events, and manage projects.
URLIt 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.

  1. Go to the Setup and click on the Object Manager tab.
  1. Select the custom or standard object in which you have to create a custom field. In this example, I have selected the Account object.
Standard and Custom Fields in Salesforce
  1. In the object setup window, click on the Fields and Relationships; in the next window, click the New button.
Salesforce Lightning Create a Field
  1. Select the field type and click on the New button.
How to create a field in Salesforce
  1. Enter the Field Label and Field Name. To make the field required (mandatory), activate the Required checkbox. After this, click on the Next button.
Salesforce Lightning Custom field
  1. To establish the field-level security, select the profiles that can access the field, then click the Next button.
Field level security for Salesforce field
  1. 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.

Create Custom field in Salesforce

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.

  1. 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.
  1. Click on the dropdown arrow of the custom field and select Edit.
Change a Field type in Salesforce
  1. Click on the button Change Field Type.
How to change a field type in Salesforce
  1. Select the new field type and click on the Next button.
Change field from text to Long text in Salesforce
  1. 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.

Change Custom Field type in Salesforce

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

Salesforce lightning change custom field type

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:

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.