---
title: perRecordResultBlock
framework: cloudkit
role: symbol
role_heading: Instance Property
path: cloudkit/ckfetchrecordsoperation/perrecordresultblock
---

# perRecordResultBlock

The closure to execute when a record becomes available.

## Declaration

```swift
var perRecordResultBlock: ((CKRecord.ID, Result<CKRecord, any Error>) -> Void)? { get set }
```

## Discussion

Discussion This property is a closure that returns no value and has the following parameters: The ID of the record. A Result that contains either a retrieved record, or an error that describes why CloudKit can’t retrieve the record. The fetch operation executes this closure once for each record ID in the recordIDs property. Each time the closure executes, it executes serially with respect to the other progress closures of the operation. If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.
