Salesforce Picklist Default Value Formula

In my Salesforce organization, I was setting up a new custom object to track service requests. Each request record required a status field with values such as New, In Progress, and Closed.

Since every request should always start in the New stage, I didn’t want users to manually select the picklist valueNew” each time they created a record. Instead, I tried to assign ‘New‘ as the default picklist value automatically.

In this Salesforce tutorial, we will learn how to assign default picklist values in Salesforce record fields using formulas and record types.

Assign Default Value to Picklist in Salesforce

In Salesforce, there are two methods to assign the default value to a picklist field.

  • Assign a default value to a picklist from record types.
  • Assign a default value to a picklist with a formula.

Assign Default Value to Picklist in Salesforce From Record Types

To assign a default value to a picklist in Salesforce using record types, navigate to the Setup page in Salesforce and follow the steps below.

  1. On the setup page of Salesforce Lightning, click on the Object Manager tab.
Add default value to Picklist in Salesforce
  1. Now, select the object in which you want to add a default value to a picklist field.
how to set default value for picklist field in salesforce
  1. In the object setup, select Record Types, then click on the object record type in which you want to assign the default picklist field value.
Salesforce Picklist Default value
  1. In the record type, go to the section Picklists Available for Editing, then click Edit on the picklist field.
Default Picklist Value in Salesforce
  1. In the edit window, go to the section Picklist Values and select the value in the Default dropdown, and click Save.
Default value in Salesforce Picklist

With this, every time we create a record using the above record type, the edited picklist will have the default values that we have assigned.

Now, create the object using the selected record type. In the fields, you will see that the default value is already filled in the picklist.

Assign default values in Salesforce Picklist

This way, we can assign a default value to a picklist field in Salesforce from the record types.

Assign Default Value to Picklist in Salesforce With Formula

Another way to assign a default value to a picklist in Salesforce is by using a formula. Using the formula, we can assign the picklist values conditionally.

For example, in the Lead custom picklist “Rating“, we can assign a value of “hot” when the revenue is more than 50k and “warm” when it is less than that.

In the example below, we will assign a default value to the Lead object’s custom fieldRating_c“. We can use a formula to assign a default value for a custom and new Picklist field because there is no option to add a formula in the standard Picklist fields.

  1. In Salesforce Lightning, navigate to Setup -> Object Manager -> select object (Lead).
Salesforce default Picklist field value
  1. In the leads setup, go to Fields & Relationships -> New -> Picklist -> Next.
Create a picklist with Default values in Salesforce
  1. Enter the Field Label as Lead Rating, then in the Values select option Enter Values, with each value separated by a new line. After this, enter the picklist field values.
Default Picklist Values in Salesforce
  1. In the formula editor, enter the formula below and validate it, then click Next.
CASE( MONTH( TODAY()), 5, "High", 8, "Medium", "Low" )
  • In this formula, we use the CASE() function to automatically assign a Lead rating based on the month.
  • We use the MONTH(TODAY()) function to return the numeric value of the current month.
  • Then, we assigned the lead rating based on the following conditions:
    • It checks whether the current month is May or five. If so, the formula dynamically assigns the default value of the lead rating to “High.”
    • It checks whether the current month is 8 August. If so, the formula dynamically assigns the default value of the lead rating to “Medium.”
    • For other months, the formula dynamically assigns the default value of the product priority to “Low”.
Salesforce Picklist Default value formula
  1. To set up the field security, select the profiles that can access the picklist and click Next.
Salesforce Custom Picklist default value
  1. Lastly, select the page layouts to make the field visible on the record page and click Save.
Default value in Picklist Salesforce

Now, to verify that the formula is working correctly and assigning the default value according to the conditions, we will create a new lead record.

I’m creating the lead record in the current month, September, so according to the conditions, the lead rating will be set to default as “cold”.

Picklist value in Salesforce formula field

This way, we can assign a default picklist value in Salesforce using the formula.

Conclusion

In this Salesforce tutorial, we learned how to set default values for picklist fields in Salesforce using two different approaches: Record Types and Formulas. With record types, we can directly assign a default value that applies whenever a record is created.

By using formulas, we can assign values conditionally based on logic, like dates, months, and other functions. Depending on the use case, we can choose the simple record type method for static defaults or use formulas for more dynamic default picklist values.

You may also like to read:

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.