Error in smart action if 'select all records' is selected

When I use ‘select all records’ and execute an action I get the following error

Unexpected error: Cannot read properties of undefined (reading 'renderingId')

If I only select some entries everything works fine.

My smart action route looks like this:

return new RecordsGetter(myModel, request.myModel, request.query)
    .then((myModelIds) => myModel.update({ ... }, { where: { id: myModelIds } }))
    .then(() => response.send({ success: 'Model updated' }))

Hi @bef,

Thank you for reporting this, I’ll try to reproduce the issue.
Could you please tell me your project name, and on which environment (development, production…) you are facing this?

The full error stack would also help if you can copy/paste it.

Thank you

I’ll try and send you the error stack

A first lead for you,

When you instantiate the new RecordsGetter, the second parameter should be the user, not the model.

Please review this snippet in our documentation

Thanks a lot that’s the problem.