ReferenceReact
useRecord
Fetch a single record by ID. Pass `includeDeleted: true` to also retrieve soft-deleted records (needed to render the restore banner on the detail view).
Fetch a single record by ID.
Pass includeDeleted: true to also retrieve soft-deleted records
(needed to render the restore banner on the detail view).
Signature
<TValues extends Record<string, unknown> = Record<string, unknown>>(objectName: string, recordId: string, options?: UseRecordOptions | undefined): UseQueryResult<TypedRecord<TValues>, Error>Examples
```tsx
const { data: product } = useRecord("products", "rec-123");
// Fetch even if archived
const { data } = useRecord("products", "rec-123", { includeDeleted: true });