# LinkedRecordsQueryResult

**Kind:** Class

Represents a set of records from a LinkedRecord cell value. See `RecordQueryResult` for main
documentation.

Do not instantiate. You can get instances of this class by calling
`record.selectLinkedRecordsFromCell`.

## Properties

### `fields`

Type: `Array<Field> | null`

The fields that were used to create this LinkedRecordsQueryResult.

### `id`

Type: `string`

The ID for this model.

### `isDataLoaded`

Type: `boolean`

### `isDeleted`

Type: `boolean`

### `isValid`

Type: `boolean`

Is the query result currently valid? This value always starts as 'true',
but can become false if the record from which this result was created is
deleted, if the field is deleted, if the field config changes to link to
a different table, or if the field config changes to link to a type
other than MULTIPLE_RECORD_LINKS. Once `isValid` has become false, it
will never become true again. Many fields will throw on attempting to
access them, and watches will no longer fire.

### `recordIds`

Type: `Array<string>`

Ordered array of all the linked record ids. Watchable.

### `records`

Type: `Array<Record>`

Ordered array of all the linked records. Watchable.

## Methods

### `getRecordById(recordId)`

Get a specific record in the query result, or throws if that record doesn't exist or is
filtered out. Throws if data is not loaded yet. Watch using `'recordIds'`.

**Parameters:**
- `recordId` (`RecordId`) — the ID of the `Record` you want

**Returns:** `Record`

### `getRecordByIdIfExists(recordId)`

Get a specific record in the query result, or null if that record doesn't exist or is
filtered out. Throws if data is not loaded yet. Watch using `'recordIds'`.

**Parameters:**
- `recordId` (`RecordId`) — the ID of the `Record` you want

**Returns:** `Record | null`

### `getRecordColor(recordOrRecordId)`

Get the `Color` of a specific record in the query result. Returns null if the record
has no color in this query result. Throws if the record isn't in the RecordQueryResult. Watch
with the `'recordColors'` and `'recordIds` keys.

**Parameters:**
- `recordOrRecordId` (`RecordId | Record`) — the record or record ID you want the color of.

**Returns:** `Color | null`

### `hasRecord(recordOrRecordId)`

Check to see if a particular record or record id is present in this query result. Returns
false if the record has been deleted or is filtered out.

**Parameters:**
- `recordOrRecordId` (`RecordId | Record`) — the record or record id to check the presence of

**Returns:** `boolean`

### `loadDataAsync()`

**Returns:** `Promise<void>`

### `toString()`

A string representation of the model for use in debugging.

**Returns:** `string`

### `unloadData()`

**Returns:** `void`

### `unwatch(keys, callback, context?)`

**Parameters:**
- `keys` (`WatchableRecordQueryResultKey | ReadonlyArray<WatchableRecordQueryResultKey>`)
- `callback` (`FlowAnyFunction`)
- `context?` (`FlowAnyObject | null`)

**Returns:** `Array<WatchableRecordQueryResultKey>`

### `watch(keys, callback, context?)`

**Parameters:**
- `keys` (`WatchableRecordQueryResultKey | ReadonlyArray<WatchableRecordQueryResultKey>`)
- `callback` (`FlowAnyFunction`)
- `context?` (`FlowAnyObject | null`)

**Returns:** `Array<WatchableRecordQueryResultKey>`
