Update
Updates specified fields of the requested record with the given values. Can also
prevent the update from occurring if the record has been modified since a given
date.
Parameters
- API version (string, optional)
- Object type (string)
- Object ID (string)
- Fields (map, optional)—Maps fields to be updated to their new values
- “If unmodified since” date (date, optional)—Fulfills the request only if the record hasn’t been modified since the given date
iOS
- Swift
-
1RestClient.shared.requestForUpdate(withObjectType:objectId:fields:) 2 3RestClient.shared.requestForUpdate(withObjectType:objectId:fields:ifUnmodifiedSince:) - Objective-C
-
1- (SFRestRequest *)requestForUpdateWithObjectType:(NSString *)objectType 2 objectId:(NSString *)objectId 3 fields:(nullable NSDictionary<NSString*, id> *)fields 4 apiVersion:(nullable NSString *)apiVersion; 5 6- (SFRestRequest *)requestForUpdateWithObjectType:(NSString *)objectType 7 objectId:(NSString *)objectId 8 fields:(nullable NSDictionary<NSString*, id> *)fields 9 ifUnmodifiedSinceDate:(nullable NSDate *) ifUnmodifiedSinceDate 10 apiVersion:(nullable NSString *)apiVersion;
Android
- Kotlin
-
1fun getRequestForUpdate(apiVersion: String?, objectType: String?, 2 objectId: String?, fields: Map<String?, Any?>?): RestRequest 3 4fun getRequestForUpdate(apiVersion: String?, objectType: String?, 5 objectId: String?, fields: Map<String?, Any?>?, 6 ifUnmodifiedSinceDate: Date?): RestRequest - Java
-
1public static RestRequest getRequestForUpdate(String apiVersion, 2 String objectType, String objectId, Map<String, Object> fields) 3 4public static RestRequest getRequestForUpdate(String apiVersion, 5 String objectType, String objectId, Map<String, Object> fields, 6 Date ifUnmodifiedSinceDate)