---
title: rootRecordDesiredKeys
framework: cloudkit
role: symbol
role_heading: Instance Property
path: cloudkit/ckfetchsharemetadataoperation/rootrecorddesiredkeys-3xrex
---

# rootRecordDesiredKeys

The fields to return when fetching the root record.

## Declaration

```swift
var rootRecordDesiredKeys: [CKRecord.FieldKey]? { get set }
```

## Discussion

Discussion For a shared record hierarchy, and when shouldFetchRootRecord is true, set this property to specify which of the root record’s fields the operation fetches. Use nil to fetch the entire record. CloudKit ignores this property for a shared record zone because, unlike a hierarchy, it doesn’t have a nominated root record. The default value is nil.
