Compound Fields in PushTopic Queries
Name Compound Field
To detect changes on the Name compound field, include the Name field in the SELECT or WHERE clause. The constituent fields, such as firstName and lastName, are optional, but the Name field is required. The returned notification message includes all constituent field values. If the Name field is omitted, changes can’t be detected, even if the constituent fields are present.
The following table shows supported and unsupported SELECT statements. These statements contain fields for the Name compound field on Contact or Lead.
| Fields | Supported? |
|---|---|
| SELECT Id, Name | Yes |
| SELECT Id, Name, firstName, lastName | Yes |
| SELECT Id, firstName, lastName | No |
Address Compound Field
To detect changes of Address compound fields, include the constituent fields in the SELECT or WHERE clause. The Address field, such as MailingAddress on Contact or ShippingAddress on Account, is optional, but the constituent fields are required. If the constituent fields are omitted, changes can’t be detected, even if the Address field is present.
The following table shows supported and unsupported SELECT statements. These statements contain MailingAddress fields of Contact.
| Fields | Supported? |
|---|---|
| SELECT Id, MailingAddress | No |
| SELECT Id, MailingAddress, MailingCity, MailingStreet | Yes |
| SELECT Id, MailingCity, MailingStreet | Yes |
Geolocation Compound Field
To detect changes of Geolocation compound fields, include the latitude and longitude constituent fields in the SELECT or WHERE clause. The Geolocation field is optional, but the constituent fields are required. If the constituent fields are omitted, changes can’t be detected, even if the Geolocation field is present.
The following table shows supported and unsupported SELECT statements. These statements contain a custom Geolocation field called location__c and its constituent fields.
| Fields | Supported? |
|---|---|
| SELECT Id, location__c | No |
| SELECT Id, location__c, location__latitude__s, location__longitude__s | Yes |
| SELECT Id, location__latitude__s, location__longitude__s | Yes |