Salesforce Number Field

Salesforce Number Field can use the number field anywhere the user wants to type something in numbers.

Recently, I worked in the Salesforce company. While working here, I received a task where I needed to enter the joining date of all the employees who work in the company. To fulfill this requirement, I used the number 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.

Number field type in Salesforce

The number field type is defined as a field type that allows the users to enter any number. The number entered by the users is treated as a real number, and any leading zeros are removed.

Salesforce also uses the half-up tie-breaking rule for the number field type. To make this a little clearer, we can take an example: this half-up tie-breaking rule 12.345 is a decimal number. When the tie-breaking rule is applied to it, it becomes 12.35, and in negative, we take -23.456, and it becomes -23.46.

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

Read How to Reset or Restart the Auto Number field in Salesforce

How to create a number field type in Salesforce Lightning

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

Consider a scenario: We are using a USA Student object. Inside the USA Student object, we want to add the late fees as a number field.

See also  How to Set Length For External Lookup Field in Salesforce

There is a school in the USA in which lots of students are studying. Some of the students are those who can pay the fee on time, and some are those who can not pay the fee on time. So, the school management decided to make the late fees field for that student who can submit the fee late.

Here are the following steps:

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

Number Field in Salesforce

2. Enter the USA Student in the search box; select the USA Student object.

Salesforce number data type

3. Click on the Fields and Relationships option that is present under the details section.

Number data type in Salesforce

4. Now create a new field. So, for this, we click on the new button.

Create a number field type in Salesforce

5. Here, we are selecting the number data type field. The number field type is defined as a field type that permits the users to enter any number. Click on the next button.

Salesforce create a number field type

6. Now enter the details. First, fill the Field Label as Late fees 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.

Salesforce create number field type

7. After entering the details, 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.

How to create number field type in Salesforce

8. Now, add the custom field to the page layout. Select the page layout that should include this field. Click on the save button.

Salesforce number field type

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

See also  How to Make Text Encrypted Field Required in Salesforce

The record page is open. There is a details section, and under this section, we can see that the number field type is created. We can enter the late fees related to the late fees column in the number field.

Create number field type in Salesforce

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

Read How to Create Email Field Type in Salesforce

How to create a number field type in Salesforce Classic

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

Here, we are taking an example. We are using the order object inside the order object, and we want to add the order number field as a number field.

Here are the following steps:

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

How to create a number field type in Salesforce

2. Enter the order in the Quick Find Box. Now click on the order drop-down menu. The drop-down list is open, under this drop-down list there is a field option. Click on the field option.

Create a number field type in Salesforce

3. After clicking on the fields option, the order custom field page is open. Scroll to the bottom of the page. There is an order custom field and a relationship section. For creating the new field click on the new button.

Salesforce create a number field type

4. Here, we are selecting the number data type field. Click on the next button.

How to create number field type in Salesforce Classic

5. Now, enter the details; first, fill in the Field Label as the Order Number and then fill in the Length as 18. After that, fill the decimal as 0 and then fill the field name by simply clicking on the field. Click on the next button.

Create number field type in Salesforce

6. Now establish the field-level security. Select the profiles to which we want to grant edit access to this field via field-level security. If we do not add field-level security, the field will be hidden from all profiles. Click on the next button.

Salesforce create number field type

7. Now, add the custom field to the page layout. Select the page layout that should include this field. Click on the save button.

How to create the number field type in Salesforce

So, with this, we have learned how to create a number field type in Salesforce Classic.

See also  How to Set External ID for Auto Number Field in Salesforce

Conclusion:

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

You may like to read: