How to Create a Checkbox Field in Salesforce

The checkbox field is defined as the field that can only be checked or unchecked in Salesforce.

Here, true represents the checkbox’s value as 1, and false represents the checkbox’s value 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.

After looking at multiple solutions, I found one that helped me create a checkbox field in Salesforce. If you want to learn how to create a checkbox field in Salesforce Lightning and Salesforce Classic, you have come to the right place.

Checkbox field in Salesforce

The checkbox field in Salesforce permits the user to select a single option represented by a checkbox within the record. It is mainly used to specify yes, no, 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, true represents the value of the checkbox as 1, and false represents the value of the checkbox as 0.

When creating a checkbox field, we must identify its properties, such as its name, 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.

See also  How to Change the Format of Auto Number Field on Existing Record in Salesforce

In this way, we have learned about creating a checkbox field in Salesforce. Now, let’s move further and see how to do it. We will explore both 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:

1. Login into the Salesforce lightning account –> Go to the gear icon –> Click on the Setup option.

How to create a checkbox field in Salesforce

2. 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

3. Here, we are selecting the account object, which is the standard object.

Create a checkbox field in Salesforce

4. Now select the fields and relationship options that are present under the details sidebar.

Create a checkbox field in Salesforce lightning

5. To create the new field, click on the new button.

Salesforce create a checkbox field

6. 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

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

8. The new custom field page is open. Now fill the Field label as Do not contact. After that, select the default value, as unchecked and then fill in the field name. Now enable the checkbox of auto add to custom report type. Click on the next button.

How to create the checkbox field in Salesforce lightning

9. Now establish field-level security. Here, we select the profile to which we want to grant edit access to this field via field-level security. Here, we want to select all the field-level security for the profile, so we click on the visible checkbox. Click on the next button.

create the checkbox field in Salesforce

10. 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. Click on the save button.

Create the checkbox field in Salesforce lightning

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

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.

See also  Salesforce Field Types

Read Salesforce Checkbox Formula

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. Login into the Salesforce Account –> click on the Profile Picture –> Select the Switch to Salesforce Classic option –> Click on the username drop-down arrow –> Select the Setup option.

How to create a checkbox field in Salesforce Classic

2. Now scroll to the bottom of the page and click on the Create dropdown arrow. Under the create dropdown list, there is an objects option present; click on the Objects.

Create a checkbox field in Salesforce Classic

3. Under this custom object page, there are lots of objects present. Here we are selecting the expense object.

Salesforce classic create a checkbox field

4. Now scroll to the bottom of the expense page, there is Custom Fields and Relationships section. There are lots of fields are already created and we want to create new field. Click on the new button.

How to create the checkbox field in Salesforce Classic

5. The data type page is open and here we are selecting the checkbox data tyep and click on the next button.

Create the checkbox field in Salesforce Classic

6. Now fill in the complete information. Fill in the Field Label as Contact us. After that select the default value as unchecked and then fill in the field name. After that enable the auto add the custom report type checkbox. Click on the next button.

Salesforce classic create the checkbox field

7. Now establish field-level security. Here we select the profile to which we want to grant edit access to this field via field-level security. Here we want to select all the field-level security for the profile so we click on the visible checkbox. Click on the next button.

How to create checkbox field in Salesforce Classic

8. 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. Click on the save button.

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

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

See also  How to Create Auto Number Field Type in Salesforce

Conclusion

I hope you read the entire article and get a clear idea of how to create a checkbox field in Salesforce.

I have also explained all the steps for creating a checkbox field in Salesforce Lightning and Salesforce Classic.

You may like the following Salesforce tutorial: