Considerations for Custom Address Fields
Before you enable custom address fields, configure State and Country/Territory picklists and review these considerations.
Required Editions
| Available in: both Salesforce Classic and Lightning Experience |
| Available in: all editions |
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. 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
- 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
- For example, require that the street, city, state, and ZIP code are all populated before you can save a custom address field.
- Apex Classes and Triggers
- 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
- 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
- For example, a report that sums the number of opportunities by the state or ZIP code within a custom address field.
- Field History Tracking
- Track and display the history of a custom address field in the History related list of an object.
- Managed Packages
- For example, include a custom address field in a managed package, or use a package to deploy that field to a sandbox.
- Change Sets
- 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.
- Change Data Capture
- 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 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 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. For details on enabling the picklists for standard address fields, see Let Users Select States, Countries, and Territories from Picklists.
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.
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
- Data Import Wizard
- Fuzzy matching
- Composite API
- Field Encryption
- Field Sets
- Flow Screen Input Component: Address
- Lead Conversion
- Lightning Web Components
- Mass Update Addresses
- Merge Fields
- Visualforce pages
- Workflow
Salesforce hasn’t validated custom address fields with these capabilities.
- Schema Builder
- Web-to-Case and Email-to-Case
- Generating Leads from Your Website
- Export Backup Data from Salesforce
- Export Data
- 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.
- 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.

