When I save a new document on the web, instead of redirecting to the newly saved document (with seq=n), I get a “page not found” instead. It also ignores my $$Return field. If save an existing document, there is no problem at all.
I am using a formula submit button (FileSave/FileCloseWindow) and the “use Javascript when generating pages” option. There is no web query save agent specified and nothing in the server logs. I don’t remember ever having this problem before. Any ideas? Thanks.
Using @Command([FileSave]) AND @Command([FileCloseWindow]) should not take you to the same document, but should really close it. If there is no $$Return item, I would expect it to show Form processed, though.
(Edit: No, that’s what takes you to the database start page.)
If you want to keep editing the same doc (with appended/updated Seq no), simply omit the second @Command.
Subject: RE: Problem with saving new document on web
Okay, that makes more sense.
I found that I get the 404 error if I specify a relative URL in $$Return. An absolute URL or plain text works fine. I didn’t realise this limitation existed.
I actually expected to see “Form processed” initially. When does this message occur?
Subject: RE: Problem with saving new document on web
Relative URLs are just fine in $$Return, but watch out where a relative link takes you.
Problem is (most of the time), that the virtual directory structure for opening a document is one level deeper that for opening a form (because of the view). I prefer to make all my links relative to the host name like
Subject: RE: Problem with saving new document on web
“Or to an appropriate view w/ it highlighted?” - Is there a Domino feature that does this automatically? Or do you need to write the URL yourself (eg. view query)?