Using the SOQL Sync Down Target
If you can define a SOQL query that selects everything required for a business need, the SOQL target is your simplest sync down option. This target takes a SOQL query and optional supporting arguments.
Mobile Sync wraps the SOQL query you provide as a REST request and sends it to Salesforce.
For the "target"
property, specify the following values.
- "type":"soql"
- "query": <string>
The SOQL query.
- "idFieldName": <string>
(Optional) Name of a custom ID field. If you provide
"idFieldName"
, Mobile Sync uses the field with the given name to get the ID of the record. For example, if you specify"idFieldName":"AcmeId"
, Mobile Sync obtains the record’s ID from theAcmeId
field instead of the defaultId
field.- "modificationDateFieldName": <string>
(Optional) Name of the field containing the last modification date for the record. If you provide
modificationDateFieldName
, Mobile Sync uses the field with this name to compute themaxTimestamp
value thatstartFetch
uses to resync the records. Default field name islastModifiedDate
.- "maxBatchSize": <integer>
(Optional) Proposed number of records to obtain in each fetch operation. If you provide a
maxBatchSize
value, Mobile Sync uses it to suggest the maximum number of records to be returned by each fetch operation. The actual number of records fetched can be more or less than the given value. Actual runtime batch sizes can depend on performance concerns, number of matching records, or a LIMIT specified in the query.
- Swift
Class:
SoqlSyncDownTarget
- Objective-C
Class:
SFSoqlSyncDownTarget
- Kotlin
Class:
SoqlSyncDownTarget
- Java
Class:
SoqlSyncDownTarget