<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKFetchRecordsOperation/fetchRecordsResultBlock",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:So23CKFetchRecordsOperationC8CloudKitE05fetchB11ResultBlockys0G0Oyyts5Error_pGcSgvp"
  },
  "title" : "fetchRecordsResultBlock"
}
-->

# fetchRecordsResultBlock

The closure to execute after CloudKit retrieves all of the records.

```
var fetchRecordsResultBlock: ((Result<Void, any Error>) -> Void)? { get set }
```

## Discussion

This property is a closure that returns no value and has the following parameter:

- A <doc://com.apple.documentation/documentation/Swift/Result> that contains either:
  - A successful `Result`, or
  - An error that contains information about a problem encountered retrieving the records.

The fetch operation executes this closure only once. The closure executes after all of the individual progress closures, but before the operation’s completion closure. The closure 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.

---

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)