-WEB:- closing a new document I want return to last open view.
First I tried by setting a profile field by Formula in the QueryClose event of the View - without success in Web. I can get the profile field in my new document, but it shows the value last modified in Notes Client.
Alternativ some use a field HTTP_Referer but (because I am using Frames and a $$ViewTemplateDefault) there is no view information inside:
Add the name of the view as an arguement to the URL used to Open the form.
e.g.
…/formname?OpenForm&lastview=lastviewname
Have a C4Display field on the form for the CGI variable QUERY_STRING and then parse out the name of the view from the QUERY_STRING field in a $$return field and use to create a redirection to the view. Remember to use square brackets (or double square brackets for an internal redirection) “”
Use javascript to write the value to a cookie and then get the value and set the location.href javascript porperty on submit. This requires the users to allow cookies.
on your forms (action, hotspot or whatever). The agent “redirect” called as “last try” in the formula above is the startpage for my app, substitute with something suitable.
A nice thing with this is that, if you´re displaying views as html, the return to the view will always open up the correct page, including expanded categories and such.