The default value for the text field uses the default value property, which automatically occupies the text field when the user or organization creates a new record.
To set the default value for the text field using the formula. We need to enter the desired default text value. The text that we enter in the default value formula field can be as simple or as our requirement.
If you want to learn how to set the default value for the text field in Salesforce, you have come to the right place.
How to Set the Default Value for Text Field in Salesforce
Here, we will learn how to set the default value for the text field in Salesforce.
Let’s take an example related to the Lead Source default value that understands the scenario clearly.
Suppose I work in a company that uses Salesforce. The company runs an online webinar, The company member notices that most of the leads come from the same source. For this, we want to save our type so we generate an automatically occupied field with a default value.
Many of the leads come from these webinars. So, for this, we set the default value for the lead source detail fields to “Webinar” whenever a new lead is created.
Here are the following steps:
1. Login to the Salesforce account –> Go to the Gear Icon –> Click on the Setup option.

2. Now click on the Object Manager tab that is present on the nav bar.

3. Now enter the lead in the search box, select the lead object.

4. The Lead object page is open. On the left side of the Lead object page, we can see the Fields & Relationships option. Click on the Fields & Relationship option.

5. The Fields and Relationships page is open. Under this page, we can see that lots of fields are already created. But we want to create a new field, so we click on the new button.

6. Here, we are selecting the text data field at the bottom of the page. This field type allows users to enter any combination of letters and numbers and then click on the next button.

7. Now enter the details. First, fill the field label as Lead Source Details and then fill the length as 18. After that, fill the field length and then fill the field name. Click on the Next Button.

8. Here, we can see that there is a default value field where we can enter the text that produces the desired default text value for the custom object called lead. We can create the default value formula as “Webinar”. Click on the next button.

9. Here, we select the profile to which we want to grant edit access to this field via field-level security. If we do not add it to field-level security, the field will be hidden from all the profiles. Click on the next button.

10. Select the page layouts that should include their fields. The field will be added as the last field in the first two-column section of these page layouts. Click on the save button.

11. The lead field and relationships page opens. This page already contains many fields, and the field we created, lead source detail with a default value, is also present inside this fields and relationships page.

12. Now go to the App Launcher, click on the app launcher, and enter the lead object in the search box. Selecting the lead object. The lead record page is open. Here, we want to create a new lead. To create the new lead record, click on the new button.
The new lead dialogue box opens. Here, we can fill in the information related to the lead. First, fill out the Salutation, then the first name and last name, and then click on the save button.

13. After clicking on the save button, Mr. John Willms’s lead record is created successfully after opening the John Willms lead record. The record page is open, and under this page, we can see that under the lead source details field, the webinar value is filled by default and shown.

In this way, we understand how to set the default value for the text field in Salesforce Lightning.
Conclusion:
I hope you read the entire article and get a clear idea of how to set the default value of the text field in Salesforce. I have also explained all the steps of setting the default value of the text field in Salesforce.
You may like to read
- How to Convert Text to Number Field Type in Salesforce
- Salesforce Change Text Field to Lookup Field
- Salesforce Formula for Text Field
- How to Change Text Field Length in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.