How to access record in infolist

I have created a named infolist inside a relationmanager resource as below

use Filament\Infolists\Components\TextEntry;
use Filament\Infolists\Infolist;

public function productInfolist(Infolist $infolist): Infolist
{
return $infolist
->record($this->product) // How to get access to the current record
->schema([
TextEntry::make('name'),
TextEntry::make('category.name'),
// ...
]);
}


How do i access the current record not the ownerrecord.
Was this page helpful?