---
title: forceUpdate
framework: CloudKit JS
role: symbol
role_heading: Instance Method
platforms: [cloudkit js 1.0+]
path: cloudkitjs/cloudkit.recordsbatchbuilder/forceupdate
---

# forceUpdate

Updates one or more existing records regardless of conflicts.

## Declaration

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

## Parameters

- `records`: A doc://com.apple.cloudkitjs/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 doc://com.apple.cloudkitjs/documentation/CloudKitJS/CloudKit.Record dictionaries or the name of the records to update. The recordChangeTag key is not required in the doc://com.apple.cloudkitjs/documentation/CloudKitJS/CloudKit.Record dictionaries. Only the values of the fields in this dictionary 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

Return Value The object that received this method call.

## Discussion

Discussion Creates records if they don’t exist.

## See Also

### Creating and Updating Records

- [create](cloudkitjs/cloudkit.recordsbatchbuilder/create.md)
- [createOrUpdate](cloudkitjs/cloudkit.recordsbatchbuilder/createorupdate.md)
- [update](cloudkitjs/cloudkit.recordsbatchbuilder/update.md)
