Salesforce Set Length and Decimal Place for Currency Field

In Salesforce, length refers to the total number of digits in the currency field, including both the digits before and after the decimal points. The decimal places refer to the number of digits that appear after the decimal point.

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

How to Set Length and Decimal Place for Currency Field in Salesforce Lightning

Here, we will learn how to set the length and decimal place for the currency field in Salesforce Lightning.

Consider a scenario: Suppose there is a salesforce retail company that sells the product online. Here is the product price, which represents the cost of each item.

If we set the length to 12 and the decimal places to 2 for the product price currency field. This permits the retail company to make accurate input and shows product prices up to 999999.99.

Here are the following steps:

1. Click on the Setup, enter the product in the search box, and select the product custom object.

How to set the length and decimal place for the currency field in Salesforce

2. Here, we select the Fields & Relationship option. After that, we want to create a new field. Click on the new button. Select the currency data type. Click on the next button.

Now, enter the details. First, enter the Field Label as Product Price, and then set the length and decimal place. Here, we set the length to 12 and the decimal place to 2. Now, enter the field name, which is automatically filled. Click on the next button.

How to set the length and decimal place for the currency field in Salesforce Lightning

3. Now, establish the field-level security and select the profile to which we want to grant edit access to this field via field-level security. The field will be hidden from all the profiles. Click on the next button.

Set the length and decimal place for the currency field in Salesforce

4. Now adding the custom field to the page layout, select the page layouts that should involve this field. Click on the save button.

Set the length and decimal place for the currency field in Salesforce Lightning

5. Go to the App Launcher, enter the sales in the search box and the sales option comes at the top. Select the sales option. Now we are selecting the product tab, the product record page is open, and we want to create a new record. Click on the new button.

See also  How to Create Global Picklist Value Set in Salesforce

The new product dialogue box is open. Now, fill in the complete information. First, fill in the product name and then the Product time. After that, fill in the Profit Margin, then the Product Code and price, and click on the Save button.

Salesforce set the length and decimal place for the currency field

6. Click on the Sales Product record; we can see the details related to the Sales product and the product price field, which is a currency field type. This Product price currency field represents the length and decimal place.

Salesforce Lightning set the length and decimal place for the currency field

With this, we understand how to set the length and decimal place for the currency field in Salesforce Lightning.

How to set the length and decimal place for the currency field in Salesforce Classic

Here, we will learn how to set the length and decimal place for the currency field in Salesforce Classic.

Let us take an example, there is a real estate company that uses the salesforce to control the property listing and prices.

Here, we are customizing this company’s Salesforce, and we need to create a field for the property price to capture the value of each property listed for sale. For the property price currency field, we set the length to 10 and the decimal place to 3.

Now follow the following steps:

1. Click on the Setup option and enter the object in the Quick Find Box. Select the object, and our custom object page will open. Here, we can see lots of objects created by us, and we want to select the property object. Click on the property object.

How to set the length and decimal place for the currency field in Salesforce Classic

2. To create a new custom field, we click on the new button. Here, we are selecting the currency data type. Click on the save button. Now, enter the details. Here, first, enter the field label as property price.

See also  Salesforce Inline Editing Checkbox

Set the length and the decimal place. Enter the field name, which is automatically filled, and then click on the next button.

Set the length and decimal place for the currency field in Salesforce Classic

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

Salesforce Classic set the length and decimal place for the currency field

4. Here, we are adding the custom field to the page layout; select the page layouts that should involve this field. The field will be added as the last field in the first two-column section of these page layouts. Click on the save button.

How to set length and decimal place for the currency field in Salesforce Classic

5. Click on the Home tab. Here, we select the property object, the property record page is open, and here, we create the new record. Click on the new button.

Here, we are filling in the information. First, fill the property name and here we are filling the property name as real estate and then fill the address, and after that, fill the city. After that, fill in the state, ZIP, property agent, and property price, and then click on the save button.

Set length and decimal place for the currency field in Salesforce Classic

6. After filling out the property price field as 2000, we move to the Real Estate record page. There is a Property Price currency field that represents the length and decimal place. Here, we can see the length and decimal part of the property price.

Salesforce Classic set length and decimal place for the currency field in Salesforce Classic

So, with this, we understand how to set the length and decimal place for the currency field in Salesforce Classic.

Conclusion:

I hope you read the entire article and get a clear idea of setting the length and decimal place for the currency field in Salesforce. 

See also  How to Promote Existing Multi-select Picklist Field Value as Global Value Set on Salesforce

I have also explained all the steps of setting the length and decimal place for the currency field in Salesforce Lightning and Salesforce Classic.

You may like to read: