I have custom Admin grid in my magento 2.
In that each row has view link when I click on view it opens complete details (same as Edit) after that I should come back to admin grid when I click on Back button/link in that (view) phtml file.
How Do I achieve this ? Actually redirect url we can use in controller but in custom phtml what we should use?
1 Answer 1
there are multiple ways to achieve that.. you can play with sessions to achieve that but I found the easiest way to achieve this is by Java script..
href="javascript: history.go(-1)"
In your back button give the above URL.
Or if you want the Magento way then you can refer the below Ans.