<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "CloudKitJS",
  "identifier" : "/documentation/CloudKitJS/CloudKit.RecordsBatchBuilder/update",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CloudKit JS"
    ],
    "preciseIdentifier" : "instm/CloudKit.RecordsBatchBuilder/update"
  },
  "title" : "update"
}
-->

# update

Updates one or more existing records.

```
CloudKit.RecordsBatchBuilder update(
	CloudKit.Record|CloudKit.Record[] records,
	optional Object options
);
```

## Parameters

`records`

A [`CloudKit.Record`](/documentation/CloudKitJS/CloudKit.Record) dictionary representing the fields of the record you want to update, if you are updating a single record. If you are updating multiple records, this parameter is an array of [`CloudKit.Record`](/documentation/CloudKitJS/CloudKit.Record) dictionaries. The [`CloudKit.Record`](/documentation/CloudKitJS/CloudKit.Record) dictionaries need to contain the `recordChangeTag` key. Only the values of the fields in these dictionaries are updated.

`options`

A dictionary containing options for this operation. This parameter contains a single `desiredKeys` key that is an array of field names (`String` values). Only the fields specified in the array are set.

## Return Value

The object that received this method call.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)