---
url: /filament-relation-navigator/v1.4/guide/previous-and-next-record.md
---
# Previous and next record

Two buttons before the header actions open the previous or the next record,
by key, **on the same page**: from a customer's invoices to the next
customer's invoices. A record that cannot open that page opens on its first
page in the menu. They are off by default, since they add a few queries per
render:

```php
'record_navigation' => true,
```

They walk through the resource's own query (`getRecordRouteBindingEloquentQuery()`),
so tenancy and your scopes apply, and skip the records the user cannot view.
Per page:

```php
public function hasRelationNavigatorRecordNavigation(): bool
{
    return true;
}

public function getRelationNavigatorRecordNavigationQuery(): ?Builder
{
    return Customer::query()->where('active', true);
}
```

Nested resources are not supported yet: they show no buttons.
