How to Make Currency Field Required in Salesforce

In the Salesforce currency field is a data type that is used to store the numerical value with a specific currency format.

In this Salesforce tutorial, we will learn how to make the currency field required 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 make the currency field required in Salesforce Lightning

Here we will learn how to make the currency field required in Salesforce Lightning. Let us take an example, Suppose we have an opportunity object and we want to create a custom currency field as amount and we want to make sure that the user must enter a value in this amount field before saving the record.

If the user tries to save an opportunity without filling in the amount field the salesforce automatically generates an error message that must fill in the value inside the field.

Follow the following steps

1. Our salesforce lightning version is open when we click on the salesforce account, and then select the setup option this setup option is present under the gear icon. Our Setup page is open.

2. Under the setup page there is an object manager tab is present. Click on this object manager tab. Under the object manager page, lots of objects are present and we are selecting the standard object opportunity.

How to make the currency field required in Salesforce

3. The opportunity detail page is open, on the left side of the page we can see there is a field and relationships option. The fields and relationship page is open, inside this page we can see lots of fields are already created.

4. Here we are selecting the already created field which is the amount field that has a currency data type. The amount page is open and under this page, we can see that the information is related to the amount and we want to edit this page.

How to make the currency field required in Salesforce Lightning

5. So we click on the edit button. The amount fields come into edit mode and we can edit anything on this page. Scroll to the bottom of the page there is a general options section and under this section, there is a required checkbox is present.

6. Click on the checked required checkbox field, this field always requires a value in this field in order to save a record. So making the currency field requires, that click on the required checkbox and click on the save button.

Make the currency field required in Salesforce

7. After clicking on the save button we can see that our custom field amount page is open under this page we can see that the field label, field name, and API name are shown as filled.

See also  How to Add Actions to Global Publisher Layouts in Salesforce

8. Scroll to the bottom of the page and under the general options section we can see that the required checkbox is also checked and below this required checkbox there is a default value field is also present that is not filled. So this required field always requires a value in this field in order to save a record.

Make the currency field required in Salesforce Lightning

9. Click on the App Launcher, and enter the sales in the search box. The sales come at the top, click on the sales option. The Sales page is open. Under this Sales page, there are lots of objects present on the nav bar and we are selecting one of the objects.

10. Here we are selecting the opportunity object. The opportunity record page is opened. Under this page, we can see opportunity record is saved. If you want to create a new record, click on the new button. The new opportunity dialogue box is open. Here we can fill in the information related to the opportunity.

11. Here we fill in the event name and then fill the opportunity name then fill in the type, and then fill in the lead source after that fill in the time duration and then fill the stage, and then fill the discount percentage, and fill in the annual revenue.

12. After that fill the Amount value which is the required field if we leave this filled empty it shows the error.So don’t leave this field blank fill in this event date and time field which is a required field after filling the amount and clicking on the save button.

Salesforce make the currency field required

13. It does not show any error it shows your record is created and our Salesforce event record has been created the details related to the Salesforce opportunity are shown and our amount field is also shown under the detail section.

Salesforce Lightning make the currency field required

In this way, we understand how to make the currency field required in Salesforce Lightning. Let’s Proceed further and learn how to make the currency field required in Salesforce Classic.

How to make the currency field required in Salesforce Classic

Here we will learn how to make the currency field required in Salesforce Classic. Let us take a real-life example, in this scenario we can see there is an organization that uses the salesforce that track and manages the employee expense report.

Each expense report has a custom currency field name as the total amount that can capture the total expenses collected by an employee. When the user tries to create, update, or edit the expense record they will be required to fill the total amount field.

See also  How to reorder the global picklist value set in Salesforce

Here are the following steps

1.  Click on the Salesforce account and our lightning version is open but we want to work on the classic version so for this click on the profile picture, under this profile picture, there is an option, present switch to Salesforce Classic. Click on this to switch to the Salesforce Classic version.

2. Click on the drop-down arrow of the username. The drop-down list is open. Under this drop-down list, we can see that the Setup option is present. Select the Setup option.

3. We can see on the left side of the setup option that is Quick Find box is present. Enter the objects in the Quick Find box, the objects come at the top and it is present at the create option. Click the object option.

4. The custom object page will open, and we can see the lots of objects present that are created by us here we want to select the expense object. On this page, we can see the details related to the expense object.

How to make the currency field required in Salesforce Classic

5. Now scroll to the bottom of the page and here we can see the custom field section under this section, we can see some fields present that are already created by us. From these fields, I selected the Total amount field and made this Total amount field required.

Make the currency field required in Salesforce Classic

6. The Total amount custom field page is open and here we can see the details related to the total amount custom field, scroll to the bottom of the page we can see there is a general options section present.

7. We can see the required checkbox is present which makes our field required and the default value field present. Here we click on the required checkbox after clicking on the checkbox.

8. The warning message pops up that is a warning: Potential Integration Impact that makes this field required may break the existing API or Apex requests that do not supply a value for this field after reading the message carefully click on the confirm button.

Salesforce Classic make the currency field required

9. After clicking on the confirm button we can see our total amount custom field page is again open here when we scroll to the bottom we can see under the general options we can see our required field is checked. This required field always requires a value inside this field in order to save the record and then click on the save button.

10. After clicking on the save button we can see our total amount custom field definition detail page is open here we can see the details related to this field and when we scroll to the bottom we can see under the general options we can see our required field is checked.

See also  How to Set Starting Number for Auto Number Field in Salesforce
How to make currency field required in Salesforce Classic

11. Go to the Home tab, and under the Home tab we can see lots of tabs are present on the nav bar here we click on the expense tab, and our expense object page is open. Under this page, we can see lots of expense records are present. 

12. We want to create a new record, click on the new button. The new expense dialogue box is open. Here we can fill in the information related to the expense. Here we fill in the expense name and then fill the transaction date and then fill the item name and after that fill the cost and fill the expense detail.

13. After that fill the Contact Us checkbox and after that, we can fill in the total amount field. If we leave the total amount field empty then the salesforce generates an error that is shown at the top of the page and under the total amount field. So don’t leave this field blank fill this total amount field which is a required field and click on the save button.

Make currency field required in Salesforce Classic

13.  After clicking on the save button it does not show any error it shows your record is created and our computer table record is created the details related to the expense are shown and our total amount field is also shown under the detail section.

Salesforce Classic make currency field required

So with this, we understand how to make the currency field required in Salesforce Classic.

Conclusion:

I hope you read the complete article and get the complete idea related to how to make the currency field required in Salesforce.  I have also explained all the steps of making the currency field required in Salesforce Lightning and Salesforce Classic.

You may like to read: