Newer Version Available
Address Compound Fields
| Field | Type | Description |
|---|---|---|
| Accuracy | picklist | Accuracy level of the geocode for the address. For example, this field is known as MailingGeocodeAccuracy on Contact. |
| City | string | The city component of the address. For example, this field is known as MailingCity on Contact. |
| Country | string | The country component of the address. For example, this field is known as MailingCountry on Contact. |
| CountryCode | picklist | The ISO country code for the address. For example, this field is
known as MailingCountryCode on Contact. For Standard Address Fields, CountryCode is only available when state and country/territory picklists are enabled in your organization. For Custom Address Fields, CountryCode is always available, whether or not state and country/territory picklists are enabled in your organization. |
| Latitude | double | Used with Longitude to specify the precise geolocation of the address. For example, this field is known as MailingLatitude on Contact. |
| Longitude | double | Used with Latitude to specify the precise geolocation of the address. For example, this field is known as MailingLongitude on Contact. |
| PostalCode | string | The postal code for the address. For example, this field is known as MailingPostalCode on Contact. |
| State | string | The state component of the address. For example, this field is known as MailingState on Contact. |
| StateCode | picklist | The ISO state code for the address. For example, this field is
known as MailingStateCode on Contact. StateCode is available only when state and country/territory picklists are enabled in your organization. |
| Street | textarea | The street component of the address. For example, this field is known as MailingStreet on Contact. |
Address fields are provided on many standard objects, such as Account, Contact, Quote, and User. Some objects provide fields for multiple addresses. For example, Account provides four different addresses. In this case, address field names are prefixed with the type of address, for example, BillingAddress and ShippingAddress.
When an address is geocoded, its latitude and longitude fields are populated with coordinates. A related geolocation field is also populated. Typically, geocoding service providers geocode addresses, and rate the accuracy of the geocodes.
The accuracy subfield GeocodeAccuracy stores the accuracy data for a geocoded location. External geolocation apps can get the accuracy level of a geocoded address via the API. When you retrieve an address via the API, any accuracy data is included. You can also retrieve the accuracy information by itself, if needed.
Like its parent, the compound Address field, the GeocodeAccuracy field is only available for standard address fields on standard objects.
Custom Address Fields
If you enabled Custom Address Fields, the Address field type is available in Object Manager when you add a custom field. Custom address fields mimic the behavior or standard address fields with some limitations.
For more information, see the Custom Address Fields Developer Guide.
Retrieving Compound Address Fields
Compound address field values are returned as a structured data type, Address. Code that works with compound address fields must reference the individual components of the returned value. See the code sample below.
Retrieve a Standard Address Compound Field with the SOAP API
This Java method uses the Salesforce SOAP API to retrieve and display the Mailing Address for a list of contacts.