Using the MRU Sync Down Target
To retrieve the most recently viewed records for a specific
Salesforce object in your org, use the MRU sync down target.
The MRU sync down target returns only the most recently viewed records for the given object, as determined by the Salesforce API.
Configuration File Usage
For the "target" property, specify the following values.
- Target Properties
-
- "type":"mru"
- "fieldList": Array of <string>
- List of fields to sync.
- "objectType": <string>
- Name of a Salesforce object.
iOS APIs
- Swift
- Class: MruSyncDownTarget
1MruSyncDownTarget.newSyncTarget(objectType: String, fieldlist: [Any]) - Objective-C
- Class: SFMruSyncDownTarget
1+ (SFMruSyncDownTarget*) newSyncTarget:(NSString*)objectType fieldlist:(NSArray*)fieldlist;
Android APIs
- Kotlin
- Class: MruSyncDownTarget
1public MruSyncDownTarget(fieldlist: List<String>, objectType: String) - Java
- Class: MruSyncDownTarget
1public MruSyncDownTarget(List<String> fieldlist, String objectType)
Example
1{
2 "syncs": [
3 {
4 "syncName": "syncDownMruContacts",
5 "syncType": "syncDown",
6 "soupName": "contacts",
7 "target": {"type":"mru",
8 "fieldlist":["FirstName", "LastName", "Title",
9 "MobilePhone", "Email",
10 "Department", "HomePhone"],
11 "object":"Contact"},
12 "options": {"mergeMode":"OVERWRITE"}
13 },
14 {
15 "syncName": "syncUpContacts",
16 "syncType": "syncUp",
17 "soupName": "contacts",
18 "target": {"createFieldlist":["FirstName", "LastName",
19 "Title", "MobilePhone",
20 "Email", "Department",
21 "HomePhone"]},
22 "options": {"fieldlist":["Id", "FirstName", "LastName",
23 "Title", "MobilePhone",
24 "Email", "Department",
25 "HomePhone"],
26 "mergeMode":"LEAVE_IF_CHANGED"}
27 }
28 ]
29}