---
schema_version: "1"
id: 0262946958ae181aa65089e95b50e228e6e60216f692702a1d0ede9b38917147
title: Considerations for Custom Address Fields
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/fields_caf_requirements.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.fields_caf_requirements.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c48bcffbc9ad47c0fed975a8ae0cd542ba100de139a7e6328618c0ea04c0255d
description: Before you enable custom address fields, configure State and Country/Territory picklists and review these considerations.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Considerations for Custom Address Fields

Before you enable custom address fields, configure State and Country/Territory picklists and review these considerations.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: all editions</td></tr></tbody></table>

## Supported Functionality

With Custom Address Fields, your Salesforce end users can add and retrieve address data via custom Address compound fields on standard and custom objects. Users can edit the custom address field data in records and view custom address data in list views and reports.

You can use custom address fields with these features.

Google Address Lookup

When users populate a custom address field, they can enter an address manually or they can use Google lookup to search for an address. When a user selects an address from Google lookup, the street, city, state or province, zip or postal code, and country are populated. To populate address details, Maps and Location Services uses the [Google Maps Geocoding API](https://developers.google.com/maps/documentation/geocoding/overview). If the Geocoding API can’t map or parse an address component, then Maps and Location Services can’t autocomplete the address field.

[State and Country/Territory Picklists](https://help.salesforce.com/s/articleView?id=xcloud.admin_state_country_picklists_configure.htm&language=en_US)

End users select state, province, country, and territory values from picklists when adding or editing addresses in custom address fields. Standard address fields work in parallel with new custom address fields. If state and country/territory picklists aren’t enabled in your org, the State and Country components of the standard Address fields remain free text fields.

[Validation Rules](https://help.salesforce.com/s/articleView?id=platform.fields_about_field_validation.htm&release=264.0.0&type=5 "Improve the quality of your data using validation rules. Validation rules verify that the data a user enters in a record meets the standards you specify before the user can save the record.")

For example, require that the street, city, state, and ZIP code are all populated before you can save a custom address field.

Apex [Classes](https://help.salesforce.com/s/articleView?id=platform.code_manage_packages.htm&language=en_US) and [Triggers](https://help.salesforce.com/s/articleView?id=platform.code_manage_triggers.htm&language=en_US)

For example, you create a custom address field, Office Address, on the Opportunity object, and you want Office Address to always have a value. You then create an Apex trigger that’s invoked when the Office Address field is unpopulated upon saving an Opportunity. The trigger populates the unpopulated Office Address field with the Billing Address on the parent Account before the Opportunity record is saved.

[List Views](https://help.salesforce.com/s/articleView?id=xcloud.customviews_lex.htm&language=en_US)

For example, you create a custom address field, Warehouse Address, on the Account object. Include the individual components of the Warehouse Address, such as the street or state, in an Accounts list view.

[Reports](https://help.salesforce.com/s/articleView?id=analytics.rd_reports_overview.htm&language=en_US)

For example, a report that sums the number of opportunities by the state or ZIP code within a custom address field.

[Field History Tracking](https://help.salesforce.com/s/articleView?id=xcloud.security_field_history_tracking.htm&type=5&language=en_US)

Track and display the history of a custom address field in the History related list of an object.

[Managed Packages](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp.htm)

For example, include a custom address field in a managed package, or use a package to deploy that field to a sandbox.

[Change Sets](https://help.salesforce.com/s/articleView?id=platform.changesets.htm&language=en_US)

Move objects with address fields created using Custom Address Fields from one Salesforce org to another.

Apex and API

To create, edit, or delete records with custom address field data, use Apex. To create a custom address field on an object, use Metadata API. To create, update, or delete a record with custom address data, use SOAP API or REST API. To retrieve information about custom address fields, such as the developer name, use Tooling API. For more information see the [Custom Address Fields Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.caf_dev_guide.meta/caf_dev_guide/caf_dev_guide.htm).

[Change Data Capture](https://developer.salesforce.com/docs/atlas.en-us.change_data_capture.meta/change_data_capture/cdc_intro.htm)

Receive real-time events for changes in custom address fields for new, updated, and undeleted records.

Skinny Tables

To avoid joins and improve the performance of certain read-only operations, include custom address fields in skinny tables, which contain frequently used fields. See [Skinny Tables](https://developer.salesforce.com/docs/atlas.en-us.salesforce_large_data_volumes_bp.meta/salesforce_large_data_volumes_bp/ldv_deployments_infrastructure_skinny_tables.htm) in Best Practices for Deployments with Large Data Volumes.

Custom Indexes

To speed up queries, create custom indexes for custom fields created with the Address data type. See [Indexes](https://developer.salesforce.com/docs/atlas.en-us.salesforce_large_data_volumes_bp.meta/salesforce_large_data_volumes_bp/ldv_deployments_infrastructure_indexes.htm) in Best Practices for Deployments with Large Data Volumes.

Geocode

To give your users precise geographical information, add geocode information to custom address fields.

## Considerations for State and Country/Territory Picklists

- Custom address fields use picklists for the State and Country address fields.
- If State and Country/Territory Picklists are enabled, those picklist values are used in standard address fields. With Custom Address Fields, the same picklist values are automatically available in custom address fields. You can’t specify separate picklist values for standard and custom address fields.
- If State and Country/Territory Picklists aren’t enabled, those picklists are enabled for custom address fields with Custom Address Fields. By default, all countries, territories, and their states and provinces are visible to users. To specify the available picklist values in Salesforce, configure State and Country/Territory Picklists.
- When you configure these picklist values, the behavior of standard address fields is unaffected unless you enable State and Country/Territory Picklists for standard fields through Setup. Enabling the picklists for standard fields isn’t required to use Custom Address Fields.
    
    For more information on configuring the picklists, see [Configure State and Country/Territory Picklists](https://help.salesforce.com/s/articleView?id=xcloud.admin_state_country_picklists_configure.htm&language=en_US). For details on enabling the picklists for standard address fields, see [Let Users Select States, Countries, and Territories from Picklists](https://help.salesforce.com/s/articleView?id=xcloud.admin_state_country_picklists_overview.htm&language=en_US).

## Requirement for Package Deployment

If a package contains a custom field with the Address field type, package deployment requires that Custom Address Fields is enabled in the target org.

## Org Limits for Custom Address Fields

For custom compound fields, each component counts as one custom field toward your org’s allocations. Thus each custom address field counts as nine custom fields: one each for street, city, postal code, country code, state code, geocode accuracy level, longitude, and latitude, plus one for internal use. For more information on the allocations for your org, see [Salesforce Features and Edition Allocations](https://help.salesforce.com/s/articleView?id=xcloud.overview_limits_general.htm&language=en_US).

## Limitations for Custom Address Fields

Before you enable Custom Address Fields or add a custom address field, understand the limitations of this feature. Custom address fields aren’t supported in these features.

- The conversion of address data into custom fields of type Address from custom fields of other types.
- [Approvals](https://help.salesforce.com/s/articleView?id=platform.what_are_approvals.htm&language=en_US)
- [Data Import Wizard](https://help.salesforce.com/s/articleView?id=xcloud.data_import_wizard.htm&language=en_US)
- Fuzzy matching
- [Composite API](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_composite.htm)
- [Field Encryption](https://developer.salesforce.com/docs/atlas.en-us.securityImplGuide.meta/securityImplGuide/security_pe_encryptable_data.htm)
- [Field Sets](https://help.salesforce.com/s/articleView?id=platform.fields_about_field_sets.htm&release=264.0.0&type=5 "A field set is a grouping of fields. For example, you could have a field set that contains fields describing a user's first name, middle name, last name, and business title.")
- [Flow Screen Input Component: Address](https://help.salesforce.com/s/articleView?id=platform.flow.htm&language=en_US)
- [Lead Conversion](https://help.salesforce.com/s/articleView?id=sales.leads_convert_parent.htm&language=en_US)
- [Lightning Web Components](https://developer.salesforce.com/docs/component-library/documentation/en/lwc)
- [Mass Update Addresses](https://help.salesforce.com/s/articleView?id=xcloud.data_updateaddresses.htm&language=en_US)
- [Merge Fields](https://help.salesforce.com/s/articleView?id=sales.cpq_merge_fields.htm&language=en_US)
- [Visualforce](https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_intro.htm) pages
- [Workflow](https://help.salesforce.com/s/articleView?id=platform.customize_wf.htm&language=en_US)

Salesforce hasn’t validated custom address fields with these capabilities.

- [Schema Builder](https://help.salesforce.com/s/articleView?id=platform.schema_builder.htm&release=264.0.0&type=5 "Schema Builder provides a dynamic environment for viewing and modifying all the objects and relationships in your app. This greatly simplifies the task of designing, implementing, and modifying your data model, or schema. Schema Builder is enabled by default.")
- [Web-to-Case](https://help.salesforce.com/s/articleView?id=service.customize_casecapture.htm&language=en_US) and [Email-to-Case](https://help.salesforce.com/s/articleView?id=service.customizesupport_email.htm&language=en_US)
- [Generating Leads from Your Website](https://help.salesforce.com/s/articleView?id=sales.setting_up_web-to-lead.htm&language=en_US)
- [Export Data](https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/exporting_data.htm)
- Filtering in a related list
- Bulk API 1.0
- Community profile

This functionality is either unavailable or limited with custom address fields.

- As with standard address fields, you can’t mark a custom address field as required.
- Data Export doesn't support records with a custom address field whose GeocodeAccuracy field contains a value. The export succeeds when the GeocodeAccuracy field is empty.
- You can’t use the DISTANCE function with a custom address field.
- To export data stored in custom fields of type Address, use API or SOQL queries. Bulk API doesn’t support the export of custom compound fields.
- The error message when you attempt to export a custom address field with Bulk API incorrectly states that the functionality isn’t enabled. Bulk API doesn’t support the export of custom compound fields.
- To populate a custom address field with imported data, use REST API or Bulk API 2.0.
- Search, including Global Search, lookup search, search manager, and SOSL queries, isn’t supported.
- In Skinny Tables, you can’t select a component of a custom address field as a partition column.
- 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.
- You can’t rename the labels for the individual components of a custom address field.
- You can localize the label of a custom address field. However, you can’t localize the labels of the individual components within a custom address field.
- The word “Address” isn’t appended to the section label for a custom address field. If you include the word “Address” in the field label, it’s included in the label for every component. For example, “Warehouse Address (State)” instead of “Warehouse (State)”. These labels are inconsistent with the label behavior for standard address fields.
- The length of the GeoCodeAccuracy field for custom fields of data type Address isn’t consistent with standard field of type Address.
- Enabling Custom Address Fields permanently restricts the Active status of State and Country/Territory picklist values. Once enabled, the Active status for all country and state codes becomes non-editable, even if you disable the State and Country/Territory Picklist feature later. Before enabling Custom Address Fields, deactivate any unwanted country or state codes in the [State and Country/Territory Picklists](https://www.google.com/search?q=https://help.salesforce.com/s/articleView%3Fid%3Dxcloud.admin_state_country_picklists_configure.htm) configuration.

#### See Also

- [Salesforce Features and Edition Allocations](https://help.salesforce.com/s/articleView?id=xcloud.overview_limits_general.htm&type=5&language=en_US)
- [Custom Address Fields](https://help.salesforce.com/s/articleView?id=platform.fields_caf.htm&release=264.0.0&type=5 "Improve address data accuracy and the end-user experience with Custom Address Fields. Users can populate a custom address field manually or they can use the Google lookup to search for an address. Admins and APIs can access each address stored in a custom address field as a structured compound data type as well as individual address components.")
- [Enable Custom Address Fields](https://help.salesforce.com/s/articleView?id=platform.fields_caf_enable.htm&release=264.0.0&type=5 "After you review the feature limitations and configure the State and Country/Territory picklists, enable custom address fields. Then you can add custom fields to standard and custom objects in Object Manager using the compound Address field type.")
- [Create a Custom Address Field](https://help.salesforce.com/s/articleView?id=platform.fields_caf_create.htm&release=264.0.0&type=5 "Use the Address field type to create a custom address field that mimics the behavior of standard address fields. For example, add a Warehouse Address field to a standard or custom object. Users can populate a custom address field manually, or they can use the Google lookup to search for an address. Then you can access each address that’s stored in a custom address field, either as a structured compound data type or as individual address components.")