@paddy_james
You can redirects to previous page with the help of HTTP_REFERER
You can follow like:
<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$request = $objectManager->get('Magento\Framework\App\Request\Http');
$backurl = $request->getServer('HTTP_REFERER');
?>
OR
namespace Vendorname\Modulename\Controller\Adminhtml\Index;
class Fetch extends \Magento\Backend\App\Action
{
public function execute()
{
// TODO: Implement execute() method.
$this->_redirect($this->_redirect->getRefererUrl());
}
}
Manish Mittal
https://www.manishmittal.com/