How to Create a Checkbox Field in Salesforce

In this Salesforce tutorial, we will learn how to create a checkbox field in Salesforce. Also, we will understand the steps of creating a checkbox field in Salesforce Lightning and the steps of creating a checkbox field in Salesforce Classic.

The checkbox field is defined as the field that can only be checked or unchecked in Salesforce. Here the true represents the value of the checkbox as 1 and the false represents the value of the checkbox as 0.

These types of checkbox fields can be added to custom or standard objects and together with custom objects, contacts, accounts, and opportunities.

While working with an organization that uses Salesforce, I got a task where I needed to create a checkbox field in Salesforce. To fulfill this requirement I use the checkbox field object that is present under the data types under the custom objects.

So after looking at the multiple solutions, I found a solution that helped me to create a checkbox field in Salesforce. If you want to learn how to create a checkbox field in Salesforce Lightning as well as Salesforce Classic, you have come to the right place.

  • Checkbox field in Salesforce
  • How to create a checkbox field in Salesforce Lightning
  • How to create a checkbox field in Salesforce Classic

Checkbox field in Salesforce

The checkbox field in Salesforce is defined as a field that permits the user to select the single option that is represented by a checkbox within the record. It is mainly used to specify yes, no or true, or false for unchecked or checked conditions.

It is also defined as the field that can only be checked or unchecked in Salesforce. Here the true represents the value of the checkbox as 1 and the false represents the value of the checkbox as 0.

When we are creating a checkbox field we must identify the field properties like field name, field label, data type, etc. The checkbox values contain boolean values True for checked and False for unchecked.

The checkbox field can be added to custom or standard objects and together with custom objects, contacts, accounts, and opportunities. This checkbox can be involved in reports, and page layouts and used in workflow rules, validation rules, formula fields, etc.

In this way, we have learned about creating a checkbox field in Salesforce. Now, let’s move further and see how to create a checkbox field in Salesforce. We will explore both the salesforce experiences: Salesforce Lightning and Salesforce Classic.

Read How to create Global Picklist Value set in Salesforce

How to create a checkbox field in Salesforce Lightning

Here we are creating a checkbox field in Salesforce Lightning. If you want to learn how to create a checkbox field in salesforce lightning follow these steps:

Step-1: Login into your Salesforce lightning account, Go to the gear icon. Under the gear icon, there are two options present first one is Setup and another one is Service Setup. Here we are clicking on the Setup option.

How to create a checkbox field in Salesforce
How to create a checkbox field in Salesforce

Step-2: After clicking on the setup option, the setup page is open. On this setup page, there is an object manager that is present in the nav bar. Click on the object manager.

How to create a checkbox field in Salesforce Lightning
How to create a checkbox field in Salesforce Lightning

Step-3: After clicking on the object manager, the object manager page is open. Under this object manager page, there are lots of objects present. Select one of the objects that are present under the object manager page. Here we are selecting the account object.

Create a checkbox field in Salesforce
Select the account object

Step-4: After clicking on the account object, the account page is open. On the left side of the account page, the fields and relationship option are present click on this field and relationship option.

Create a checkbox field in Salesforce lightning
Select the field and relationship item

Step-5: After clicking on the field and relation option, the field and relationship page is open. For creating the checkbox field, click on the new option that is present at the top of the page.

Salesforce create a checkbox field
Click on the new button

Step-6: After clicking on the new button, the data type page is open. There are lots of data type present. Select one of the data types, here we select the checkbox data type which allows users to select a true or false value. The true value represents the checked field and the false value represents the unchecked field.

Salesforce lightning create a checkbox field
Click on the checkbox data type

Step-7: After clicking on the checkbox data type, now scroll to the bottom of the page and select the next option.

How to create the checkbox field in Salesforce
How to create the checkbox field in Salesforce

Step-8: After clicking on the next button, the new custom field page is open. Now fill in the complete information related to the checkbox field. First, fill the field label and here we are filling the field label as Do not contact.

After that select the default value but the default value is selected as unchecked and then fill in the field name the filled name is automatically filled by simply clicking on the field of the field name and then auto-add to a custom report type.

Click on the checkbox to add this field to existing custom report types that contain this entry after that click on the next button.

How to create the checkbox field in Salesforce lightning
How to create the checkbox field in Salesforce lightning

Step-9: After clicking on the next button, the next step is to establish field-level security. Here we select the profile to which we want to grant edit access to this field via field-level security. The field will be hidden from all the profiles if we do not add it to field-level security.

Here we want to select all the field-level security for the profile so we click on the visible checkbox and all the checkboxes are checked and then click on the next button.

create the checkbox field in Salesforce
Established the field level of security

Step-10: After checking the field-level security, the next step is to add to the page layouts.

Here select the page layouts that should include their fields. The field will be added as the last field in the first two-column section of these page layouts. The field will not appear on any pages if we do not select a layout. To change the location of this field on the page, we will need to customize the page layout.

When we finished, click on the save and new button for creating more custom fields, or click on the save button if we are done.

Create the checkbox field in Salesforce lightning
Click on the save button

Step-11: After clicking on the save button the Do not contact checkbox field is created and present under the field and relationship page.

Salesforce create the checkbox field
Salesforce Create the checkbox field

In this way, we understand how to create a checkbox field in Salesforce Lightning. Let’s Proceed further and learn how to create a checkbox field in Salesforce Classic.

How to create a checkbox field in Salesforce Classic

Here we are creating a checkbox field in Salesforce Classic. If you want to learn how to create a checkbox field in Salesforce Classic follow these steps:

1: First log in to the Salesforce account, when we log in to the account the Salesforce lightning edition is open. Moving to Salesforce Classic, click on the Profile picture. The Profile picture drop-down list is open. Under this profile picture list, there is an option to switch to Salesforce Classic. Click on it.

After clicking on the switch to Salesforce Classic option, click on the drop-down arrow of the username. The drop-down list is open, under this list Setup option is present below the My Profile option. Click on the Setup.

How to create a checkbox field in Salesforce Classic
How to create a checkbox field in Salesforce Classic

2: After clicking on the setup option, the setup page is open. Now scroll to the bottom of the page and click on Create a dropdown option that is present on the left sidebar. Under the create option there is an object, click on the Objects.

Create a checkbox field in Salesforce Classic
Select the objects option

3: After clicking on the object, the custom object page is open. Under this custom object page, there are lots of objects present. Select one of the objects that are present under the custom object page. Here we are selecting the expense object.

Salesforce classic create a checkbox field
Salesforce Classic creates a checkbox field

4: After clicking on the expense object, the expense page is open. Now scroll to the bottom of the expense page, there are fields and relationship options present click on this field and relationship option.

After clicking on the field and relation option, the field and relationship page is open. For creating the checkbox field, click on the new option that is present at the top of the page.

How to create the checkbox field in Salesforce Classic
How to create the checkbox field in Salesforce Classic

5: After clicking on the new button, the data type page is open. There are lots of data type present. Select one of the data types, here we select the checkbox data type which allows users to select a true or false value. The true value represents the checked field and the false value represents the unchecked field.

After clicking on the checkbox data type, now scroll to the bottom of the page and select the next option.

Create the checkbox field in Salesforce Classic
Select the checkbox field

6: After clicking on the next button, the new custom field page is open. Now fill in the complete information related to the checkbox field. First, fill in the field label and here we are filling in the field label as contact us.

After that select the default value but the default value is selected as unchecked and then fill in the field name the filled name is automatically filled by simply clicking on the field of the field name and then auto-add to a custom report type.

Click on the checkbox to add this field to existing custom report types that contain this entry after that click on the next button.

Salesforce classic create the checkbox field
Fill in the information related to the checkbox field

7: After clicking on the next button, the next step is to establish field-level security. Here we select the profile to which we want to grant edit access to this field via field-level security. The field will be hidden from all the profiles if we do not add it to field-level security.

Here we want to select all the field-level security for the profile so we click on the visible checkbox and all the checkboxes are checked and then click on the next button.

How to create checkbox field in Salesforce Classic
Established the field-level security

8: After checking the field-level security, the next step is to add to the page layouts.

Here select the page layouts that should include their fields. The field will be added as the last field in the first two-column section of these page layouts. The field will not appear on any pages if we do not select a layout. To change the location of this field on the page, we will need to customize the page layout.

When we finished, click on the save and new button for creating more custom fields, or click on the save button if we are done.

Create checkbox field in Salesforce Classic
Click on the Save button

9: After clicking on the save button the Do not contact checkbox field is created and present under the field and relationship page.

Salesforce classic create checkbox field
Salesforce Classic creates a checkbox field

In this way, we understand how to create a checkbox field in Salesforce Classic.

Conclusion

Here we have learned about creating a checkbox field in Salesforce. We have also discussed how to create a checkbox field in Salesforce.

In this tutorial we conclude that we created a checkbox field we must identify the field properties like field name, field label, data type, etc. The checkbox values contain boolean values True for checked and False for unchecked.

Here the true represents the value of the checkbox as 1 and the false represents the value of the checkbox as 0.

Moreover, we have learned that Salesforce Lightning as well as Salesforce Classic gives a simple and easy way to determine how to create a checkbox field in Salesforce.

In addition to this, the following are the topics that we have discussed in this blog:

  • Checkbox field in Salesforce
  • How to create a checkbox field in Salesforce Lightning
  • How to create a checkbox field in Salesforce Classic

You may like the following Salesforce tutorial: