---
title: "init(recordsToSave:recordIDsToDelete:)"
framework: cloudkit
role: symbol
role_heading: Initializer
path: "cloudkit/ckmodifyrecordsoperation/init(recordstosave:recordidstodelete:)"
---

# init(recordsToSave:recordIDsToDelete:)

Creates an operation for modifying the specified records.

## Declaration

```swift
convenience init(recordsToSave: [CKRecord]? = nil, recordIDsToDelete: [CKRecord.ID]? = nil)
```

## Parameters

- `recordsToSave`: The records to save. You can specify nil for this parameter.
- `recordIDsToDelete`: The IDs of the records to delete. You can specify nil for this parameter.

## Discussion

Discussion The records that you intend to save or delete must all reside in the same database, which you specify when you configure the operation. If your app saves a record in a database that doesn’t exist, the server creates the database.

## See Also

### Creating a Modify Record Operation

- [init()](cloudkit/ckmodifyrecordsoperation/init().md)
