How to Set Default Value for Percentage Field in Salesforce

In this Salesforce tutorial, we will learn how to set the default value for the percentage field in Salesforce.

For learning this process you have come to the right place and we learned this topic in both the editions of Salesforce Lightning and Salesforce Classic.

How to set the default value for the percentage field in Salesforce Lightning

Here we will learn how to set the default value for the percentage field in Salesforce Lightning.

So let’s take an example from which we can easily understand the scenario related to the default value for the percentage field, Suppose I am a sales manager in a company that sells lots of products, and this company is based in the United States of America.

When the winter season is coming all the company decided to give the discount on the summer products. They think that after giving the discount on the products the customer can buy more and more products and their stock of summer get easily be sold before the winter comes all the summer stock is finished and they can fill the winter products easily.

Here the company uses the opportunity object in the salesforce and creates a custom discount percentage default field. Here we want to set the default value of the 5% percentage of this field.

Here are the following steps:

1. First log in to the Salesforce account, in this Salesforce Lightning org, we set the default value for the percentage field.

2. For this, we can click on the gear icon that is present at the top right corner, click on the gear icon, and then click on the Setup option.

3. After clicking on the Setup option, the setup page is open, Under this Setup page there is the Object Manager tab present click on the object manager tab.

4. The Object Manager page opens, after clicking on the Object Manager tab. Under this object manager tab, lots of objects are present.

5. Here we are entering the opportunity in the search box. The opportunity object comes at the top after searching for the object in the search box. click on the opportunity object.

How to set the default value for the percentage field in Salesforce

6. After clicking on the opportunity object, The opportunity object page is open. Under this page, we can see the details related to the object. On the left side under the detail section of the opportunity object page, we can see the Fields and Relationships option is present. Click on the Fields and Relationship option.

How to set the default value for the percentage field in Salesforce Lightning

7. After clicking on the Fields and Relationships option, the Fields and Relationships page is open. Under this page, we can see that lots of fields are already created. If we want to create a new field, we click on the new button else choose the field that we want to edit and we want to create a new field. So we click on the new button.

Set the default value for the percentage field in Salesforce

8. After clicking on the new button our data type page is open and under this page, we can see lots of data types are present here we are selecting the percentage field and then clicking on the next button.

See also  How to Create Self Relationship in Salesforce

9. After clicking on the data type our customer information page is open, under this page we can see the information related to the Opportunity fill information carefully.

10. First fill the field label as Discount Percentage and then fill the field name after that we scroll to the bottom of the page there is a default value field present and here we want to set the default value for this discount percentage field as 5% percent that is 0.05 and then click on the next button.

Set the default value for the percentage field in Salesforce Lightning

11. After filling the complete information, now we move to our next step which is to establish field-level security that can 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 the profiles if we do not add it to field-level security and then click on the next button.

Salesforce set the default value for the percentage field

12. After establishing the field-level security we want to add this field to the page layout. Select the page layouts that should involve this field. This field will be added as the last field in the first 2-column section of these page layouts.

13. 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 and then click on the save button.

Salesforce Lightning set the default value for the percentage field

14. Go to the home tab, and under this home tab, we can see lots of tabs are present on the nav bar. Here we are selecting the opportunity object from the nav bar, the opportunity object page is open and under this object, we can see the records are present that are already present.

16. Here we we are creating a new record so we click on the new button. The new opportunity page is open and under this page, we can see the information related to opportunity. First, fill the opportunity name and then fill the type and then fill the lead source, and then fill the discount percentage, and then click on the save button.

17. After filling the information related to the opportunity object, our opportunity record sales product is created and our sales product detail page is open under this page, we can see our default value which is the discount percentage field, and our discount percentage field is set to 5%.

How to set default value for the percentage field in Salesforce Lightning

In this way, we understand how to set the default value for the percentage field in Salesforce Lightning. Let’s Proceed further and learn how to set the default value for the percentage field in Salesforce Classic.

How to set the default value for the percentage field in Salesforce Classic

Here we will learn how to set the default value for the percentage field in Salesforce Classic. Let’s take an example to clearly understand the scenario, There is a company that uses the salesforce and makes projects and I am the manager of the company, and it’s my duty to check the project from time to time.

See also  How to deactivate global picklist value in Salesforce

Here the company members decided to make a field for project completion percentage and set the default value under the project completion percentage field after completing the 70 percent project it’s the team leader’s responsibility to give the project to the tester and test the project that their team completed.

For this the company uses the salesforce and makes the field project completion percentage and under this field sets the percentage that reminds the team lead on how much percentage it gives the project to a tester for testing.

Here are the following steps:

1. When we log into the Salesforce account, our Salesforce Lightning account is open but we wanted to work on the Salesforce Classic version so for moving to the Salesforce Classic account.

2. For this click on the profile picture, under this profile picture, there is an option to switch to a Salesforce classic account. Click on the switch to a Salesforce Classic, Our Salesforce Classic org is open.

3. Under this Salesforce Classic org, we can see that the username is present. Click on the drop-down arrow of the username. The drop-down list is open, after clicking on the drop-down arrow. Under this drop-down list, we can see that the Setup option is present. Select the Setup option.

4. The Setup page is open. Under this setup page, we can see on the left side there is Quick Find box is present. Enter the objects in the Quick Find box.

5. Click on the object, and the custom object page will open. We can see that lots of objects are present that are created by us and here we want to select the project object. Click on the project object.

How to set the default value for the percentage field in Salesforce Classic

6. There is a detail related to the project object. Now scroll to the bottom of the page, we can see there is a section on custom fields and relationships, and under this section, there is we can see already created fields are present but we want to create a new field for the project and set the default value for the percentage field in salesforce.

7. After clicking on the new button our data type page is open and under this page, we can see lots of data types are present here we are selecting the percentage field and then clicking on the next button.

8. After clicking on the data type our project information page is open, under this page we can see the information related to the project fill information carefully.

9. First fill the field label as project completion percentage and then fill the field name after that we scroll to the bottom of the page there is a default value field present and here we want to set the default value for this discount percentage field as 70% percent that is 0.70 and then click on the next button.

Set the default value for the percentage field in Salesforce Classic

10. After filling the complete information, now we move to our next step which is to establish field-level security that can 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 the profiles if we do not add it to field-level security and then click on the next button.

See also  Salesforce Number Field

11. After establishing the field-level security we want to add this field to the page layout. Select the page layouts that should involve this field. This field will be added as the last field in the first 2-column section of these page layouts.

12. 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 and then click on the save button.

Salesforce Classic set the default value for the percentage field

13. Go to the home tab, and under this home tab, we can see lots of tabs are present on the nav bar. Here we are selecting the opportunity object from the nav bar, the project object page is open and under this object, we can see the records are present that are already present.

14. Here we we are creating a new record so we click on the new button. The new project page is open and under this page, we can see the information related to the project.

15. First, fill the project name as Salesforce Project and then fill the type and then fill the project Documentation URL, and then fill the Project description, and then fill the project completion after that, we can see that our default value project completion percentage field is by default filled and then click on the save button.

How to set default value for the percentage field in Salesforce Classic

16. After filling the information related to the Project object, our salesforce project record is created and our salesforce project detail page is open under this page, we can see our default value which is the project completion percentage field, and our project completion percentage field is set to 70%.

17. Here we can edit, delete, clone, and share by simply clicking on these edit, delete, clone, and sharing buttons.

Set default value for the percentage field in Salesforce Classic

So, with this, we understand how to set the default value for the percentage field in Salesforce Classic.

Conclusion:

The percentage field permits the user to input and store values as the percentage. The percentage field is mainly used to represent proportion and ratio in various objects.

I hope you read the complete article and get the complete idea related to how to set the default value for the percentage field in Salesforce.  I have also explained all the steps of setting the default value for the percentage field in Salesforce Lightning and Salesforce Classic.

You may like to read: