Salesforce Percentage Field

The salesforce percentage field is used to enter the percentage number. We can use the percentage field anywhere the user wants the calculation in percentage.

Recently, I worked in a Salesforce company in America. They were assigned the task of calculating the percentage of all the employees who work in the company. To fulfill this requirement, I used the percentage Field Type, which is present under the Field and Relationship.

Let’s discuss in more detail how to create the percentage field type in Salesforce Lightning and Salesforce Classic.

Percentage field type in Salesforce

The percentage field type permits users to enter a percentage number. The system automatically converts the decimal number to a percentage.

For example, Santa Clara’s biggest school in the USA is where lots of students want to study. To be admitted to this school, they first clear the entrance exam. They get 90% marks for clearing the entrance exam.

To calculate the percentage of the student marks, the school examiner can choose the percentage field type, which easily converts numbers, decimals, and so on to percentages, such as entering 0.10.

However, the value loses its decimal value after 15 decimal places. If we enter the value more than 15 decimal places and add a percentage sign to the number, a runtime error occurs.

Now, let’s move further and see how to create the percentage field type in Salesforce Lightning and Salesforce Classic.

See also  How to Set Length Limit for Text Area Long Field in Salesforce

How to create a percentage field type in Salesforce Lightning

Here we are creating the percentage field type in Salesforce Lightning. 

Here are the following steps:

1. Login into Salesforce Account –> Go to gear icon –> Click on the Setup option –> Select the Object Manager tab.

Salesforce Percentage Field

2. Enter the USA Student object in the search box and select the USA Student object that is the custom object.

Percentage Field in Salesforce

3. Here, we click on the Fields and Relationships option that is present under the details section.

Percentage Field Salesforce

4. Here, we want to create a new field. So, for this, click on the new button.

Create the percentage field in Salesforce

5. Here, we are selecting the percentage data type checkbox. The percentage field allows the users to enter a percentage number, for example, 10, and automatically adds the percent sign to the number. Click on the Next button.

Salesforce create the percentage field type

6. Now enter the details. First, fill the Field Label as Student Percentage and then fill the Length as 18. After that, fill the Decimal as 0. Then, click on the field name. Click on the next button.

Create Percentage Field Type in Salesforce

7. Now establish field-level security. Now select the profiles to which we want to grant edit access to this field via field-level security. Click on the Next button

Salesforce create the percentage field

8. Now, add the custom field to the page layoutSelect the page layout that should include this field. This field will be added as the last field in the first 2-column section of this page layout. Click on the save button.

How to create percentage field type in Salesforce

9. Go to the app launcher and enter sales in the search box. Select sales, the sales page is open and then select the USA Student object. The USA Student record page is open.

See also  Effects when Auto Number Field Exceeds the Specific Digits in Salesforce

There is a details section, and under this section, we can see that the percentage field type is created. We can enter the student percentage related to the percentage in the percentage field.

How to create percentage field in Salesforce

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

Read How to Create Number Field Type in Salesforce

How to create a percentage field type in Salesforce Classic

Here we are creating the percentage field type in Salesforce Classic.

Consider a scenario: We are using the product object inside the product object, and we want to add the product quality percentage field as a percentage field.

For adding the product quality percentage field we get the knowledge about the product and how much the good quality of the product we use.

Here are the following steps:

1. Go to the Profile Picture –> Click on the Switch to Salesforce Classic option –> Select the Setup option.

Salesforce Percentage field type

2. Enter the Products in the Quick Find Box. Click on the product drop-down menu. The drop-down list is open; under this drop-down list, there is a Fields option. Click on the fields option.

Create the percentage field in Salesforce

3. The Product custom object page is open. Scroll to the bottom of the page. There is a section titled Product Custom Fields and Relationships. To create a new field, click on the New button.

Salesforce create the percentage field

4. Here, we are selecting the Percentage field checkbox. Click on the next button.

Percentage field salesforce

5. Now enter the details; first, fill in the Field Label as Product Quality Percentage and then fill in the Length as 18. After that, fill the Decimal as 0 and then fill the field name. Click on the next button.

Percentage field in salesforce

6. Now establish the field-level security. Now select the profiles to which we want to grant edit access to this field via field-level security. Click on the next button.

Salesforce create percentage field

7. Now, add the custom field to the page layout. Select the page layout that should include this field. This field will be added as the last field in the first 2-column section of this page layout. Click on the Save button.

How to create a percentage field in Salesforce

Conclusion

I hope you got an idea of how to create a percentage field in Salesforce. I have also explained step by step how to create the percentage field type in Salesforce Lightning and Salesforce Classic.

See also  Custom Picklist Field in Salesforce

You may also like: