dynamic model

Hi All I am wondering if you can help me,
I am building a custom page, the custom data is working fine however when I try and do an Action::make it trys to get it from the default table for the model like it is set before mounting below is my page for the custom logic, the table data itself is filled out and working however the error I get is
php SQLSTATE[42S02]: Base table or view not found: 1146 Table 'tenantfoo.user_datasets' doesn't exist
I cant include the whole file because of discord limits, if you want the rest let me know but it builds the form correctly.
the $dynamicTableName property on the UserDataSet just sets the table in the constructor.

```php

public function mount(int|string $record): void
{
$this->record = Dataset::where('id', $record)->first();
UserDataSet::$dynamicTableName = "ds
" . $this->record->table_name;

$this->dataSet = UserDataSet::all();

static::authorizeResourceAccess();
}
public function table(Table $table): Table
{
return $table->columns($this->getFormSchema())
->query(UserDataSet::query())
->headerActions([
\Filament\Tables\Actions\Action::make('create')
->form([
TextInput::make('name')->label('Name')
])->action(function (array $data, UserDataSet $record): void {
dd($data);
})->mountUsing(function () {
dd('hello');
})
]);
}
}
```
Was this page helpful?