{"record":{"id":"887ea91360262b99","repo":"filamentphp/filament","slug":"the-total-count-of-selected-records-resolvedsel","errorCode":null,"errorMessage":"The total count of selected records [{$resolvedSelectedRecords->count()}] must not exceed the maximum selectable records limit [{$maxSelectableRecords}].","messagePattern":"The total count of selected records \\[(.+?)\\] must not exceed the maximum selectable records limit \\[(.+?)\\]\\.","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"packages/tables/src/Concerns/HasBulkActions.php","lineNumber":264,"sourceCode":"                    'keys' => $this->selectedTableRecords,\n                    'records' => $this->selectedTableRecords,\n                    'deselectedKeys' => $this->deselectedTableRecords,\n                    'deselectedRecords' => $this->deselectedTableRecords,\n                    'isTrackingDeselectedKeys' => $this->isTrackingDeselectedTableRecords,\n                    'isTrackingDeselectedRecords' => $this->isTrackingDeselectedTableRecords,\n                ]) :\n                ($this->isTrackingDeselectedTableRecords ? $this->getTableRecords()->except($this->deselectedTableRecords) : $this->getTableRecords()->only($this->selectedTableRecords));\n\n            if ($table->checksIfRecordIsSelectable()) {\n                $resolvedSelectedRecords = $resolvedSelectedRecords->filter(\n                    fn (Model | array $record): bool => $table->isRecordSelectable($record)\n                );\n            }\n\n            $maxSelectableRecords = $table->getMaxSelectableRecords();\n\n            if ($maxSelectableRecords && ($resolvedSelectedRecords->count() > $maxSelectableRecords)) {\n                throw new LogicException(\"The total count of selected records [{$resolvedSelectedRecords->count()}] must not exceed the maximum selectable records limit [{$maxSelectableRecords}].\");\n            }\n\n            return $this->cachedSelectedTableRecords = $resolvedSelectedRecords;\n        }\n\n        $query = $this->getSelectedTableRecordsQuery($shouldFetchSelectedRecords, $chunkSize);\n\n        if (! $shouldFetchSelectedRecords) {\n            return $this->cachedSelectedTableRecords = $query->toBase()->pluck($query->getModel()->getQualifiedKeyName());\n        }\n\n        if ($chunkSize && $table->getRelationship() instanceof BelongsToMany && ! $table->allowsDuplicates()) {\n            $invadedRelationship = invade($table->getRelationship());\n\n            $resolvedSelectedRecords = $query->lazyById($chunkSize)\n                ->tapEach(fn (Model $record) => $invadedRelationship->hydratePivotRelation([$record]));\n        } elseif ($chunkSize) {\n            $resolvedSelectedRecords = $query->lazyById($chunkSize);","sourceCodeStart":246,"sourceCodeEnd":282,"githubUrl":"https://github.com/filamentphp/filament/blob/53483fa9340e4ec637985fe454ebb58afb92ea24/packages/tables/src/Concerns/HasBulkActions.php#L246-L282","documentation":"Error \"The total count of selected records [{$resolvedSelectedRecords->count()}] must not exceed the maximum selectable records limit [{$maxSelectableRecords}].\" thrown in filamentphp/filament.","triggerScenarios":"Thrown at packages/tables/src/Concerns/HasBulkActions.php:264 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"53483fa9340e4ec637985fe454ebb58afb92ea24","analyzedAt":"2026-08-17T02:06:23.049Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}