function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MakMak 

Redirecting user to correct view

Hi

I have multiple views for an object. The user can select any view and go on to edit any particualr instance of the object.
Now I want to redirect the user to correct view (the one he came from), when he is done with editing and hits 'Save'.
Is there any method in Apex which could give me the last URL?

Thanks
hisrinuhisrinu
Hi,

There is a method called geturl(), using this you can get the current page url and then you can pass this url to the next page.
After passing this url to next page, you can associte this url as per your requirement.
This is not the good solution, but it will work for you.
MakMak
Thanks Srini

Actually I have overloaded view of my page to point to a custom visualforce page.
So I need to supply the url when the user clicks on an item.
But I dont see how I can add the URL on overloaded view.

Thanks again