Newer Version Available

This content describes an older version of this product. View Latest

Compound Fields—Beta

Compound fields group together multiple elements of primitive data types, such as numbers or strings, to represent complex data types, such as a location or an address. Compound fields are an abstraction that can simplify application code that handles the values, leading to more concise, understandable code. Address and geolocation compound fields are available in the SOAP and REST APIs in API version 30.0 and later.

This release contains a beta version of compound fields that is production quality but has known limitations. You can provide feedback and suggestions for compound fields, especially compound address fields, on the IdeaExchange.

Note

Compound fields are accessible as a single, structured field, or as individual component fields. The values contained within the compound field and the values in individual fields both map to the same underlying data stored in Salesforce; they always have identical values. Code that references individual component fields is unaffected by the new compound fields.

Compound fields are read-only. Changes are performed by writing to the individual component fields. This maintains a single, consistent method for performing updates, and avoids the possibility of conflicts. For example, if both the BillingAddress compound field and BillingCity individual component field were updated in the same API call, it would be unclear which value should be saved.

Compound fields are available only through the SOAP and REST APIs. Compound fields are described in both the Enterprise and Partner WSDLs. Update your WSDL to at least API 30.0 to access the new compound data types.