Collection Update
Updates the requested collection with the given
records.
For collections, you can disallow partial updates by specifying an all-or-none parameter. When you set this parameter to true, Mobile SDK rolls back the entire request if any record update fails.
Mobile SDK provides a custom response object for parsing Collection request results. See Collection Response.
Parameters
- API version (string, optional)
- "All or none" preference (Boolean)
- Records (array of sObjects)
iOS
- Swift
-
1let request = RestClient.shared.requestForCollectionUpdate(allOrNone, 2 records:records, apiVersion: apiVersion) - Objective-C
-
1- (SFRestRequest*) requestForCollectionUpdate:(BOOL)allOrNone 2 records:(NSArray<NSDictionary*>*)records 3 apiVersion:(nullable NSString *)apiVersion;
Android
- Kotlin
-
1val request = 2 RestRequest.getRequestForCollectionUpdate(ApiVersionStrings.getVersionNumber(this), 3 allOrNone, records) - Java
-
1public static RestRequest getRequestForCollectionUpdate(String apiVersion, 2 boolean allOrNone, JSONArray records) throws JSONException
React Native
1collectionUpdate= <T>(
2 allOrNone: boolean,
3 records: Array<Record<string, unknown>>,
4 successCB: ExecSuccessCallback<T>,
5 errorCB: ExecErrorCallback,
6): void