In this Salesforce tutorial, we will discuss how to add an address field to custom object in Salesforce Lightning and Salesforce Classic.
Recently, when I working on creating a custom object in Salesforce, I got a requirement to add an address field for the object. However, after researching and analyzing, I came across a solution that worked for me.
So, here we will cover the same method which is listed below.
- How to create a custom object in Salesforce Lightning
- How to create a custom object in Salesforce Classic
- How to add address field to custom object in Salesforce Lightning
- How to add address field to custom object in Salesforce Classic
How to add address field to custom object in Salesforce Lightning
To add the address field to a custom object in Salesforce Lightning, we need to follow the following approach
- Create a custom object in Salesforce Lightning
- Enabling the custom address field in Salesforce Lightning
- Adding the address field to a custom object in Salesforce Lightning
Let us start with the first step:
Read: How to Whitelist IP addresses in Salesforce
1. How to create a custom object in Salesforce Lightning
Now before we jump to the main steps, we need a custom object in Salesforce Lightning. So, in this section, we will discuss the steps to first create a custom object in Salesforce Lightning.
- First login to your Salesforce account, navigate to the Setup menu by clicking on the gear icon (⚙️), and then Setup.
- From the Home Setup page, click on the “Object Manager” option.

- On the next page, click on the “Create” button and then click on “Custom Object” to create a new custom object.

- Next, we need to define label and plural label for the custom object, such as “Customer Address” and “Customer Addresses“, respectively.

- After this, we will set the “Record Name” format to “Text” and the field for our records to “Customer Address Name“.

- In the last, click on the “Save” button to create your custom object.
Here is another example of creating a custom object in Salesforce: How to Create a Custom Object in Salesforce.
2. Enable Custom Address Field in Salesforce Lightning
Once we have created a custom object in Salesforce, the next step is to enable the custom address field. And for this task, we will use the following steps:
Step-1: First open the Home Setup page in Salesforce Lightning.
Step-2: From the Quick Find search box, search for User Interface and open it.

Step-3: Next, under the Setup section, tick mark the “Use custom address fields” option.

Step-4: At last, click on the Save button.
3. Add address field to custom object in Salesforce Lightning
After creating our custom object and enabling the custom address field in Salesforce Lightning, we are ready to add an address field.
Here are the steps for this task in Salesforce:
- First, open the detail page for the custom object. For this, navigate to Object Manager > Custom Address > Edit.

- From the left side menu, click on “Fields & Relationships” and click on the “New” button to create a new custom field.

- Next, select “Address” as the field type and click “Next“.

- After this, specify a label and name for the field, such as “Mailing Address” and click “Next“.

- Next, customize the field settings as needed, including visibility, field-level security, and help text.
- In the end, save the new address field by either clicking “Save” or “Save & New“.
Once all these steps are completed, we can access the address field when we try to insert a record for that particular object.

However, if the Address field is not visible, add it to your custom object’s page layout by going to the “Page Layouts” section and dragging the address field onto the layout.
So, with this, we have successfully added the address field to a custom object in Salesforce Lightning.
Also, check: How to delete custom objects in salesforce
How to add address field to custom object in Salesforce Classic
To add the address field to a custom object in Salesforce Classic, we need to follow the same approach
- Create a custom object in Salesforce Classic
- Enabling the custom address field in Salesforce Classic
- Adding the address field to custom object in Salesforce Classic
1. How to create a custom object in Salesforce Classic
Here are the steps that we can follow to create a custom object in Salesforce Classic.
Step-1: Once you log in to the Salesforce Classic edition, click on the Setup option given in the top right corner.
Step-2: After this, from the left side menu, expand Create, and click on Object given under the Build section.

Step-3: Next, create a Donor object by specifying Label, Plural Label, and Object Name.

Step-4: Next, scroll down, under the “Enter Record Name Label and Format” section, specify Record Name as Donor Name and Data Type as Text.
Step-5: At last, click on the Save button to create a Donor Object in Salesforce Classic.
Read How to Create Custom Big Objects in Salesforce
2. Enable Custom Address Field in Salesforce Classic
The steps required to enable the custom address field in Salesforce Classic are the same as those given for the Salesforce Lightning edition.
So, for Salesforce Classic, navigate to User Interface using the Quick Find search box. And then tick mark the Use custom address fields option.
However, please note that if you have already enabled the Custom Address field using Salesforce Lightning, you don’t need to enable it separately using Salesforce Classic.
3. Add address field to custom object in Salesforce Classic
Here are the steps that we can follow to create a custom object in Salesforce Classic.
1: Log in to the Salesforce Classic edition, and click on the Setup option given in the top right corner.
2: Next, from the left side menu, expand Create, and click on the Object given under the Build section. This will open the Custom Objects page in Salesforce Classic.
3: From the Custom Objects page, select the object and click on the required object. In our case, the object is the Donor.

This will open the “Custom Object” page in Salesforce Classic.
4: From the next page, scroll down to the Custom Fields & Relationships section and click on New to create a new field.
5: After this, select the Data Type for the field as Address as shown in the case of Salesforce Lightning.
6: Then specify the Field Label as “Donor Address” and click on the Next button.
7: Next, customize the field settings as needed, including visibility, field-level security, and help text.
8: In the end, save the new address field by either clicking “Save” or “Save & New“.
Once all these steps are completed, we can access the address field when we try to insert a record for that particular object.

So, with this, we have successfully added the address field to a custom object in Salesforce Classic.
You may also like to read the following Salesforce tutorials.
- How to Create Custom List Button in Salesforce
- How to Create Custom Detail Page Button in Salesforce
- How to Create Field Update Using Workflow rule in Salesforce
- How to add Bucket Field in Salesforce
Conclusion
So, in this Salesforce tutorial, we have understood how to add address field to custom object in Salesforce Lightning and Salesforce Classic. However, for both editions, we have discussed steps with the help of examples.
Here is the list of topics that we covered.
- How to create a custom object in Salesforce Lightning
- How to create a custom object in Salesforce Classic
- How to add address field to custom object in Salesforce Lightning
- How to add address field to custom object in Salesforce Classic
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.