Salesforce Checkbox Formula

In this Salesforce tutorial, we will learn how to create the checkbox formula in Salesforce. For creating the checkbox formula field, Salesforce gives us the formula feature this formula feature has inbuild functions and operators.

This formula field has a feature to correct the formula. We can check the formula that we enter in the field is correct or not by simply clicking on the check syntax button that is present below the formula field and this button is attached to the formula field.

I am the manager of a bank organization that uses Salesforce as a CRM tool. Here I got the responsibility to automatically mark an opportunity as Closed Won If the Stage is and the Amount is greater than 100000.

The customer can come to the bank and see the latest opportunity they can invest more and more in our bank. They can submit more than 10000 amounts in their accounts, and for this thing they both get benefits.

If you want to learn the process of how to create the checkbox formula you have come to the right place and we learn this topic in both the editions in Salesforce Lightning and Salesforce Classic.

How to Create Checkbox Formula in Salesforce Lightning

Here we will learn how to create the checkbox formula field in Salesforce Lightning. Let us take an example we choose the opportunity object under this opportunity object there is a field and relationship option under this option we choose the formula data type. For this formula field, we use Deal Clouser Checkbox where we want to mark automatically an opportunity as closed.

If the amount is greater than 10000 dollars and the stage is closed won. Now we can create a checkbox formula field that is Closed Won to specify whether the opportunity is closed won.

If you want to learn how to  create the checkbox formula in salesforce lightning, follow these steps:

Step-1: Login to the Salesforce account, when we log in the Salesforce Lightning org is open directly. Click on the gear icon, this gear icon is present near the profile picture.

After clicking on the drop-down list is open and under this drop-down list, there are two options is present. The first one is Setup and another one is Service Setup. Click on the Setup option. After clicking on the Setup option, the setup page is open.

Under this setup page, we can see there are two tabs that are present on the nav bar. The first tab is Home, and the next tab is Object Manager. Here we are choosing the object manager tab, so click on the Object Manager tab.

How to Create Checkbox Formula in Salesforce

Step-2: After clicking on the Object Manager, The Object Manager page is open. Under this object manager page, lots of objects are present, and we want to select one of the objects. And we can also choose the object by simply entering the object name in the search box that is present at the right top corner.

So we enter the opportunity object in the search box, and the opportunity object comes at the top of the page. After comes the object at the top, select the opportunity object and the type of the object is Standard object.

How to Create Checkbox Formula in Salesforce Lightning

Step-3: After clicking on the opportunity object, the opportunity page is open. Here we can see the details related to the opportunity. And under this opportunity object on the left-hand side of the page, there is a separate section of details.

And under these details, there is a field and relationships option. We are selecting this field and relationship option for creating the fields and creating the relationship between the fields and the object.

Create Checkbox Formula in Salesforce

Step-4: After clicking on the Field and Relationships page, the field and relationship page is open. Here we can see that the opportunity field and relationship page is open.

Under this field and relationship page, there are lots of fields present, but we want to create a new field. So, for creating the new custom field. Click on the new button that is present in the middle of the field and relationship page.

Create Checkbox Formula in Salesforce Lightning

Step-5: After clicking on the new button, the Opptunity new custom field page is open. Now we are choosing the field type.

See also  Salesforce Formula Date Less Than Today

And specifying the type of information that the custom field will contain. Here we are choosing the formula data type that can read-only field that derives its value from a formula expression you define.

The formula field is updated when any of the source fields change. Click on the next button.

Salesforce Create Checkbox Formula

Step-6: After choosing the Formula field type. Now choose the output type. First, fill the Field Label here we are filling the field label as Closed Won and then fill the field name. Here the Field Name is simply filled by clicking on the field. After entering the label and name of the field.

Now click on the checkbox auto add to custom report type this checkbox can add the field to the existing type that contains this entity. After completing the Choose output type section.

Now choose the formula return type and here we select the formula return type and here we are selecting the checkbox formula return type. This checkbox formula return type is used to calculate the boolean value and after that click on the next button.

Salesforce Lightning Create Checkbox Formula

Step-7: After choosing the formula return type. Now enter the formula and click check syntax to check for the errors. Click the advanced formula subtab to use additional fields, operators, and functions. There are two options for the formula field simple formula and advanced formula.

Here we are clicking on the advanced formula tab, this is the formula editor that creates our formula. In this formula we want to mark an opportunity as closed won if its stage is Closed Won and its amount is greater than $10000. And we can see our created formula is shown under the formula field.

After creating the formula, now scroll to the bottom of the page and click on the check syntax button that is present below the formula section.

How to Create the Checkbox Formula in Salesforce

Step-8: After entering the formula and check the syntax. Now established the field-level security. Select the profiles to which we want to grant edit access to this field via field-level security. The field will be hidden from all profiles if we do not add it to the field-level security.

After that click on the visible checkbox of the field-level security for the profile and then click on the next button which is present near the previous option.

How to Create the Checkbox Formula in Salesforce Lightning

Step-9: Now we can add the page layout after establishing the field-level security. Select the page layouts that should involve this field.

The field will be added as the last field in the field two-column section of these page layouts. This field will not appear on any pages if you do not select a layout. To change the location of this field on the page, we will need to customize the page layout. Click on the save button.

Create the Checkbox Formula in Salesforce

Step-10: After Saving the checkbox formula, now go to the app launcher. Enter the sales in the search box. Click on the Sales option. The Sales page is open, under this sales page lots of objects are present on the nav bar. Select one of the objects, here we are selecting the opportunity object.

The opportunity page is open, we want to create a new record related to the opportunity, so click on the new button. The Opportunity information dialogue box is open. Fill the complete information related to the opportunity.

First, fill the Opportunity name as Deal Clouser then select the type as Existing Customer – Upgrade after that Fill the amount if the amount we fill in is greater than $ 10000 and the stage is set to Close Won then the Closed Won checkbox is checked else it is unchecked.

So we fill the amount as $ 1000000 and the Stage we set as Close Won then enter the closed date after that fill the probability as 100% then click on the save button.

Create the Checkbox Formula in Salesforce Lightning

Step-11: After saving the record, the Opportunity Deal Clouser page is open. Here we can see the detail related to the deal closure.

Under this deal closure detail page when we scroll to the bottom we can see there is a Closed Won checkbox field present which is checked this show that the amount and the stage are filled according to the formula if the amount and stage are not filled perfectly our closed won checkbox is unchecked.

Salesforce Create the Checkbox Formula

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

See also  How to add 1 month to Date in Salesforce

Read Salesforce Checkbox Validation Rule

How to Create Checkbox Formula in Salesforce Classic

Here we will learn how to create the checkbox formula in Salesforce Classic. Let’s take an example to understand it clearly. We work in a company that uses Salesforce that can control or manage the leads for their sales team.

So we choose to use the checkbox field of High Priority to specify the lead that should be chosen based on certain criteria of high priority.

We can use the Checkbox Formula of Salesforce that automatically decided whether the lead should be marked as High Priority.

Let’s say we have different attributes such as Industry, and Number of Employees based on these attributes we choose that if Industry is a technology with more than 100 employees then our checked box of high priority is checked or we can say that marked as a high priority.

Now, we discuss the steps related to how to create a checkbox formula in Salesforce Classic. If you learn how to create it follow the complete steps.

1: Login into the Salesforce account, the Salesforce Lightning account is open for moving to the Classic account. Click on the profile picture, after clicking on the profile picture the drop-down list is open. Under this drop-down list there is a switch to the Salesforce Classic option click on the switch to Salesforce Classic option.

The Salesforce Classic org is open. Here we can see there is a username present at the top of the org. Click on the drop-down arrow of the username. The username drop-down list is open. Under this drop-down list, there is a Setup option. Click on the Setup option.

The Setup page is open, under this setup page there is Quick Find Box is present on the left side. Enter the Leads object in the Quick Find box, the leads object comes at the top and this lead object is present under the Customize app.

Under this Lead object, there are lots of options present select one of the options. Here we are selecting the Fields option.

How to Create Checkbox Formula in Salesforce Classic

2: After clicking on the Field option of the Lead object. The Lead custom object page is open. Now scroll to the bottom of the page and see the Lead custom field and relationships section here. And we want to create a new custom field related to the Lead by simply clicking on the new button.

Create Checkbox Formula in Salesforce Classic

3: After clicking on the new button, the Lead new custom field page is open. Now we are choosing the field type. And specifying the type of information that the custom field will contain.

Here we are choosing the formula data type that can read-only field that derives its value from a formula expression you define. The formula field is updated when any of the source fields change. Click on the next button.

Salesforce Classic Create Checkbox Formula

4: After choosing the Formula field type. Now choose the output type. First, fill the Field Label here we are filling the field label as High Priority and then fill the field name.

Here the Field Name is simply filled by clicking on the field. After entering the label and name of the field. Now click on the checkbox auto add to custom report type this checkbox can add the field to the existing type that contains this entity.

After completing the Choose output type section. Now choose the formula return type and here we select the formula return type and here we are selecting the checkbox formula return type.

How to Create the Checkbox Formula in Salesforce Classic

5: Now enter the formula, after choosing the formula return type. And click check syntax to check for errors. Click the advanced formula subtab to use additional fields, operators, and functions. There are two options for the formula field simple formula and advanced formula.

Here we are selecting the advanced formula, now we enter the formula here the formula combines several conditions using the AND function.

If all the conditions are met, the checkbox field High Priority will automatically check. This show that the lead is a high priority. After creating the formula, now scroll to the bottom of the page and click on the check syntax button that is present below the formula section.

Create the Checkbox Formula in Salesforce Classic

6: Check the syntax after entering the formula and check the syntax. Now established the field-level security. Select the profiles to which we want to grant edit access to this field via field-level security.

See also  Salesforce Formula DATETIMEVALUE

The field will be hidden from all profiles if we do not add it to the field-level security. After that click on the visible checkbox of the field-level security for the profile and then click on the next button which is present near the previous option.

Now established the field-level security. Select the profiles to which we want to grant edit access to this field via field-level security.

The field will be hidden from all profiles if we do not add it to the field-level security. After that click on the visible checkbox of the field-level security for the profile and then click on the next button which is present near the previous option.

Salesforce Classic create the Checkbox Formula

7: Now we can add the page layout after establishing the field-level security. Select the page layouts that should involve this field.

The field will be added as the last field in the field two-column section of these page layouts. This field will not appear on any pages if you do not select a layout.

To change the location of this field on the page, we will need to customize the page layout. Click on the save button.

How to Create a Checkbox Formula in Salesforce Classic

8: After saving the button, the setup page is again open. Here we can see on the nav bar lots of objects are present. Here we are selecting the Lead object.

After selecting the lead object. The lead edit new lead page is open, under this page the detail related to the lead object.

First, fill the First Name, the first name we will enter is Mylene after that fill the Last Name as Walsh, and then Fill the company Cremin, Schuster, and Little. After that fill the Lead Status as Open – Not Contacted and then fill the no. of Employees as 126. After filling the complete information click on the save button.

Create a Checkbox Formula in Salesforce Classic

9: After saving the record, the Lead Mylene Walsh page is open. Here we can see the Lead detail related to Mylene Walsh.

Under this Mylene Walsh detail page when we scroll to the bottom we can see there is a High Priority checkbox field present which is checked this show that the Industry and Number of Employees are based on these attributes we choose that if the Industry is a technology with more than 100 employees then our checked box of high priority is checked or we can say that marked as a high priority.

This checked high-priority checkbox show that the Industry fill as technology and the no. of the employee is 126 this match the criteria.

Salesforce Classic Create a Checkbox Formula

So with this, we learned how to create the checkbox formula in Salesforce Classic.

Conclusion:

In this whole tutorial, we learn how we can use the checkbox formula. Here is the formula field that can read-only field that derives its value from a formula expression you define. The formula field is updated when any of the source fields change. The checkbox formula field return type is used to calculate the boolean value.

I hope you read the complete article and we get the complete idea related to the checkbox formula in Salesforce. The formula field has a feature to correct the formula.

We can check the formula that we enter in the field is correct or not by simply clicking on the check syntax button that is present below the formula field and this button is attached to the formula field.

You may like to read: