Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Composite Request
Returns a RestRequest object that you then use to
execute the composite request.
Parameters
- apiVersion (string)
-
requests
-
- iOS
-
- requests (array)—Array of subrequests
- refIds (array)—Array of reference IDs for the requests. The number of elements should match the number of requests.
- Android
- refIdToRequests (map)— LinkedHashMap of reference IDs to RestRequest objects. Requests are played in the order in which they’re mapped.
-
- allOrNone (Boolean)—Flag that indicates whether to treat all requests as a single transactional block in error conditions.
iOS
- Swift
-
1RestClient.shared.compositeRequest(requests:refIds:allOrNone:apiVersion:) - Objective-C
-
1- (SFRestRequest *)compositeRequest:(NSArray<SFRestRequest *> *) requests 2 refIds:(NSArray<NSString *> *)refIds 3 allOrNone:(BOOL)allOrNone 4 apiVersion:(nullable NSString *)apiVersion;
Android
- Kotlin
-
1@Throws(JSONException::class) 2fun getCompositeRequest(apiVersion: String?, allOrNone: Boolean, 3refIdToRequests: LinkedHashMap<String?, RestRequest?>): CompositeRequest - Java
-
1public static CompositeRequest getCompositeRequest(String apiVersion, 2 boolean allOrNone, LinkedHashMap<String, RestRequest> refIdToRequests) 3 throws JSONException