Access parent $record in relation manager

Hi all

Does anyone know how to access the parent $record in a relation manager? I have an attach action that I need to scope using a parent attribute. Have tried this but $record is null:

Tables\Actions\AttachAction::make()
   ->recordSelectOptionsQuery(function (Builder $query, Model $record) {
     }
Solution
Or $livewire->ownerRecord
Was this page helpful?