Compound Fields.
Table of Contents
Overview ⇧
Purpose: This feature enhances the readability and conciseness of SOQL queries by allowing the direct inclusion of compound fields such as BillingAddress
.
This approach simplifies query writing by abstracting the complexity of specifying each individual component of compound fields.
Related Features: This functionality complements features like the Field Multiselect Feature, which also aim to streamline the creation of SOQL queries.
Configuration Example ⇧
For instance, in your export.json
configuration file, you might specify a query as follows:
"query": "SELECT Id, BillingAddress FROM Account"
Internally, this query is expanded to include all sub-fields of the BillingAddress
compound field:
"query": "SELECT Id, BillingGeocodeAccuracy, BillingCity, BillingCountry, BillingLatitude, BillingLongitude, BillingPostalCode, BillingState, BillingStreet FROM Account"
How It Works ⇧
You can directly reference compound fields like BillingAddress
, ShippingAddress
, and MailingAddress
in your SOQL queries for Account
or Contact
objects. The system then automatically decomposes these compound fields into their constituent components when executing the query.
Benefits:
- Simplicity: Reduces the complexity of your queries by not requiring each sub-field of a compound field to be individually specified.
- Readability: Makes your queries easier to read and maintain, especially when dealing with multiple compound fields.