Zend certified PHP/Magento developer

Reload page after mass action on sales order grid

I created a new order status called Printed that has to be assigned after the mass action Print invoices on sales_order_grid.

I created all the custom logic to achieve the result. The only problem is that the controller returns an instance of MagentoFrameworkAppResponseHttpFileFactory which sets in the headers 200 as response code.

The only way to see the grid with the updated order statuses is of course to refresh the page.

Is there a way to refresh the page after all the invoices files have been downloaded?

I’m working on Magento 2 EE 2.2.6