---
title: hierarchicalRootRecordID
framework: cloudkit
role: symbol
role_heading: Instance Property
path: cloudkit/ckshare/metadata/hierarchicalrootrecordid
---

# hierarchicalRootRecordID

The record ID of the shared hierarchy’s root record.

## Declaration

```swift
@NSCopying var hierarchicalRootRecordID: CKRecord.ID? { get }
```

## Discussion

Discussion CloudKit populates this property only for metadata that belongs to a shared record hierarchy. If the metadata is part of a shared record zone, the property is nil. This is because, unlike a shared record hierarchy, a shared record zone doesn’t have a nominated root record.

## See Also

### Accessing the Root Record

- [rootRecord](cloudkit/ckshare/metadata/rootrecord.md)
- [rootRecordID](cloudkit/ckshare/metadata/rootrecordid.md)
