Salesforce URL Field

In Salesforce CRM, we have many custom and standard data type fields that store records of specific data types. For example, the Text data type stores data of fields like name and address. In the same way, the URL field stores data from fields like website addresses and URL links. In this Salesforce tutorial, we will learn to create and use the Salesforce URL field.

The URL field allows users to enter a valid URL link. When users click on the field, it navigates to the URL address in the next window.

Create a URL Field in Salesforce

In this example, I will create a URL field for the Case object records. Here, we will add the URL field to track the documentation related to the particular case.

To create the documentation, we can copy and paste the link for that document into the URL field of the Case record. The user can click on the URL field, and the URL of the documentation will open in a separate browser.

Follow the below steps to create a custom URL field type in a Salesforce object.

1. Navigate to the Setup page of Salesforce from the settings icon. On the Setup page, click on the Object Manager tab.

How to set the default value for the URL field in Salesforce

2. In the Object Manager, select the Object in which you want to create the URL field. In this example, we have selected the Case object.

How to create URL field type in Salesforce Lightning

3. In the Case setup window, click on Fields and Relationships.

Create URL field type in Salesforce

4. In the next window, click on the New button.

Create URL field type in Salesforce Lightning

5. From the list of data types, select the URL data type and click Next.

Salesforce create URL field type

6. Enter the following details to configure the URL field.

  • Enter the Field Label and Field Name.
  • To make the URL field required, activate the Required field checkbox.
  • If you want to set a default value or default URL for the custom URL field, then you can enter that URL (web link) in the Default Value field.
  • Click the Next button.
Set Default value in Salesforce URL field

7. To establish field-level security, select the profiles to which we want to grant access to the URL field. After this, click on the Next button.

See also  Add and Replace Picklist Values in Salesforce
How to create the URL field type in Salesforce

8. Select the Page Layouts to make this URL field visible on those page layouts.

At last, click on the Save button.

How to create the URL field type in Salesforce Lightning

9. Navigate to the object in which you created the URL field and create a new record or open an exciting record. There, you will see the URL field with the default value (URL link) that we entered.

Create the URL field type in Salesforce

In this way, we can create a URL field in Salesforce objects by following the above steps.


In this Salesforce blog, we have learned about the process of creating and setting up a custom URL field in a Salesforce object; you can follow the same process to create the URL field in any other standard or custom Salesforce object.

Along with this, we also learned to set the default value in a URL field and to make a URL field required in a Salesforce object record.

You may also like the following tutorials: