You are currently viewing How To Create Custom Address Field In Salesforce

How To Create Custom Address Field In Salesforce

Sharing is caring!

Salesforce has long been a go-to platform for managing customer relationships and streamlining business processes, but customizing it to meet specific needs can make it even more effective. One such customization involves creating a custom address field—a crucial feature for accurately capturing and managing location-based data. 

Creating a custom address field in Salesforce can significantly enhance your ability to manage and visualize address-related data. With the introduction of the custom address field in Summer ’22, Salesforce has made it easier than ever to tailor address fields to fit your specific needs. 

This blog will walk you through creating a custom address field, from understanding the basics of address fields in Salesforce to implementing your custom address fields.

Table of Contents

  • Understanding Salesforce Standard Address Fields
  • Why create a Custom Address Field?
  • Enabling Custom Address Fields
  • Step-by-Step guide to creating a Custom Address Field

Understanding Salesforce Standard Address Fields

Salesforce offers a standard Address field on several standard objects, such as Contacts, Leads, Accounts, Person Accounts, Quotes, and Users. This field is a composite field, meaning it combines various address components—such as City, State, Zip Code, and Country—into a single field for ease of use.

Key Features Of Standard Address Fields

  • Manual Entry: Users can enter address information manually.
  • Google Lookup: Integration with Google allows automatic address lookups.
  • Fixed Structure: The field structure is predefined and limited to standard use cases.

While these standard fields are helpful, they may not always meet your organization’s specific needs.

Why Create A Custom Address Field?

Custom address fields are ideal when you must capture address information not covered by the standard fields. For instance, if your organization tracks specific locations like airports, warehouses, or branch offices, a custom address field can be tailored to fit those needs.

Benefits Of Custom Address Fields

  • Flexibility: Customize field components based on your needs.
  • Custom Objects: Add address fields to custom objects not covered by standard fields.
  • Enhanced Data Management: Tailor the address format to fit unique business requirements.

In cases where standard address fields fall short, creating a custom address field provides the flexibility needed to manage address data effectively.

Steps To Enable Custom Address Fields

Before creating a custom address field, you must enable the Salesforce feature. Follow these steps to activate the custom address field setting:

Step 1: Navigate to Setup: Find the gear icon in the upper right corner of your Salesforce instance, click it, and select Setup.

Step 2: Search User Interface: In the Quick Find box, type User Interface and select it from the dropdown.

Step 3: Enable Custom Address Fields: Check the box next to Use Custom Address Fields (Beta).

Note: Once enabled, the custom address field setting cannot be disabled. Ensure that you need this feature before turning it on.

Steps To Enable Use Custom Address Fields (Beta) Setting

Follow these four steps if you need to do this:

Step 1: Navigate to Setup

Step 2: Type User Interface in Quick Find

Step 3: Click User Interface

Step 4: Select Use custom address fields (Beta)

Note: After activating it, you cannot disable the Use Custom Address (Beta) setting. Please only switch it on if you intend to use it in your org.

Steps To Create A Custom Address Field In Salesforce

Step 1: In your Salesforce org, click the gear icon and select Setup.

Step 2: Click the Object Manager tab.

Step 3: Go to the Object Manager page and select the object you want to add to the custom address field. 

Step 4: From the sidebar, click Fields & Relationships.

Step 5: To create a custom field, click New.

Step 6: Choose Address as the data type.

Please give it a Field Label, Help Text, and Description, then assign it to the relevant profiles and page layouts per your requirements.

Step 7: After creating this field, add it to the layout if not added.

Step 8: Click on Page Layout to open it. 

And this is the field on the Account object.

These are some of the functionalities that are either unavailable or limited with Custom Address Fields.

  • You can’t mark a custom address field as required as with Standard Address Fields.
  • Using the DISTANCE function with a custom address field is impossible.
  • Use API or SOQL queries to export data stored in custom-type Address fields. Bulk API does not support the export of custom compound fields.
  • While attempting to export a custom address field with Bulk API, the error message incorrectly states that the functionality is not enabled. Besides, Bulk API does not support the export of custom compound fields.
  • Use REST API or Bulk API 2.0 to populate a custom address field with imported data.
  • Search queries only support the data stored within the Street component of custom fields of type Address. State, City, Postal Code, and Country are not supported for search. 
  • You can’t select a component of a custom address field as a partition column while using a Skinny table.
  • While configuring search results for an object, custom address fields aren’t supported in Search Filter Fields (only available in Salesforce Classic). Package installation and Metadata deployment () fail when you specify a custom address field as a Search Filter Field in a search layout.
  • Compound address fields aren’t supported in reports. To include a custom address field in a report, add the individual address components, such as street, city, state, and zip.
  • When using a custom address field in a Data Integration Rule, the Country and State components are unavailable for field mapping.
  • Renaming the labels for the individual components of a custom address field is impossible.
  • It is possible to localize the label to a custom address field. However, localizing the labels of the individual components within a custom address field is impossible. 
  • The section label for a custom address field does not have the word “Address” appended. If the word “Address” is included in the field label, it is included in the label for every component. To cite as an adult example, “Warehouse Address (State)” is used in place of “Warehouse (State)”. Besides, these labels have inconsistent label behavior for standard address fields.
  • The length of the GeoCodeAccuracy field for custom fields of data type Address is inconsistent with the standard field of type Address.

Limitations Of Custom Address Fields In Salesforce

Here are some of the functionalities that are either unavailable or limited with Custom Address Fields:

  • Cannot Mark as Required: Unlike standard address fields, custom address fields cannot be marked as required.
  • DISTANCE Function Unsupported: The DISTANCE function cannot be used with custom address fields.
  • Export Restrictions: Custom address fields cannot be exported using Bulk API; errors may incorrectly state that the functionality is not enabled.
  • API Export Limitations: Use REST API or Bulk API 2.0 to populate custom address fields; Bulk API does not support the export of custom compound fields.
  • Search Query Limitations: Search queries only support the Street component of custom address fields; State, City, Postal Code, and Country are not searchable.
  • Skinny Table Partitioning: Custom address field components cannot be selected as partition columns for Skinny tables.
  • Search Filter Field Restrictions: Custom address fields are not supported in Search Filter Fields for search layouts or package installations.
  • Reporting Constraints: Reports do not support compound address fields; instead, they include individual address components like street, city, state, and zip.
  • Data Integration Rules: Country and State components of custom address fields are unavailable for field mapping in Data Integration Rules.
  • Label Renaming Issues: Labels for individual components of custom address fields cannot be renamed.
  • Localization Limitations: While you can localize the overall label of a custom address field, individual components cannot be localized.
  • Inconsistent Section Labels: The section label for custom address fields does not include the word “Address,” leading to inconsistent label behavior.
  • GeoCodeAccuracy Field Length: The length of the GeoCodeAccuracy field for custom address fields is inconsistent compared to standard address fields.

Conclusion 

To conclude, the Custom Address Field feature is the perfect solution if you want to avoid creating multiple fields for address-related information (Country, State, City, Street, and postal code).

Moreover, the Custom Address Field in Salesforce offers various benefits. It improves data accuracy. It is similar to the Standard Address fields since it can be populated manually or searched for an address with Google Lookup. Moreover, the custom fields have an appearance that is familiar to the users. Finally, the APIs and professionals can access individual address components, such as the entire address.

Creating a custom address field in Salesforce allows you to tailor the CRM to fit your specific needs, whether you’re dealing with custom objects or require more control over address data. Custom address fields provide a powerful way to manage and utilize address data more effectively, offering a solution beyond standard address fields’ capabilities. Whether managing customer addresses, recording locations, or handling specific data needs, custom address fields provide the flexibility and control you need to get the most out of Salesforce.

Following the steps outlined above, you can set up a custom address field that enhances data management and improves overall efficiency within your Salesforce environment.

If you need assistance with custom address fields set up or hiring cost-effective, results-driven CRM services, contact Cloud Analogy, a leading Salesforce consulting company. We’re here to help you optimize your Salesforce environment and achieve your business goals. Hire the best-in-class Salesforce consulting services today!

Akshay

Akshay Dhiman

Chief Technical Officer
Akshay Dhiman, the CTO of Cloud Analogy, has been a standout and successful Salesforce Platform Developer for years. He has a rich experience in Salesforce Integration, JavaScript, APEX, VisualForce, Force.com Sites, Batch Processing, Lightning, PHP, C++, Java, NodeJs, ReactJs, Angular 8, GraphQL, React Native, Web Technology, and jQuery.

Hire the best Salesforce Development Company. Choose certified Salesforce Developers from Cloud Analogy now.

× How can I help you?