<!--
{
  "availability" : [

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

# newRecordsBatch

Creates records batch builder object for modifying multiple records.

```
CloudKit.RecordsBatchBuilder newRecordsBatch(
	optional Object options
);
```

## Parameters

`options`

A dictionary containing options to use when modifying records. Possible dictionary keys are:
    
    |Key          |Description                                                                                                                                                                                                                                                                                                               |
    |-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
    |`zoneID`     |A ``doc://com.apple.cloudkitjs/documentation/CloudKitJS/CloudKit.ZoneID`` or zone name (`String`) that identifies the record zone in the database where you want to perform the operation. The default is the database default zone.                                                                                      |
    |`desiredKeys`|An array of strings containing record field names that limits the amount of data returned in this operation. Only the fields specified in the array are returned. The default is `null`, which fetches all record fields.                                                                                                 |
    |`atomic`     |A Boolean value indicating whether the entire operation fails when one or more operations fail. ![](spacer) If `true`, the entire request fails if one operation fails. If `false`, some operations may succeed and others may fail. The default value is `false`. ![](spacer) This property only applies to custom zones.|

## Return Value

A [`CloudKit.RecordsBatchBuilder`](/documentation/CloudKitJS/CloudKit.RecordsBatchBuilder) object for this database.

---

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)