No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
Compound Field Considerations and Limitations
Address and geolocation compound fields are convenient,
and result in more concise, clear code. However, there are a number
of things you should consider when using them in your apps.
Both address and geolocation compound fields have the following
limitations.
- Compound fields are read-only. Use the individual field components to update field values.
- Compound fields are accessible only through the SOAP and REST APIs. The compound versions of fields aren’t accessible anywhere in the Salesforce user interface.
- Compound fields can’t be used in Apex, because there is no Apex data type for compound fields. Use the individual field components to access or update field values.
- Compound fields can’t be used in Visualforce, for example, in an <apex:outputField>. Use the individual field components to access or update field values.
- Compound fields aren’t searchable. For proximity searches, use a WHERE DISTANCE(field, GEOLOCATION(lat, long), "units") < desiredPoximity clause. For text string matches—for example, matching a city or postal code—search the individual fields.
- Compound fields can’t be imported or exported. Use the individual field components to load or export values.
Address compound fields have the following limitations.
- Compound address fields are only available for standard addresses, that is, those address fields that exist as a basic part of the standard objects included in Salesforce. You can’t create custom compound address fields.
- The geolocation component of address fields isn’t set automatically. You need to use a geocoding service to set these values before you can use address fields as locatable values. Search the AppExchange for “geocode” to find a number of possible solutions.