URL commands for opening documents by key
The following commands allow you to open a document by using the key value of the first sorted column of a view, such as a document name, or to generate a URL to link to a document by key. Hidden design elements are hidden from the server too; you can't use Domino® URL commands to access documents in hidden views, unless you've hidden the view by surrounding its name in parentheses, rather than using the Hide tab in the Properties box.
Using Domino® URLs to access a document
To open a document by key, create a sorted view with the sort on the first key column. Then use a URL to open the document.
Syntax
http://Host/Database/View/DocumentName?OpenDocument
Where:
- View is the name of the view. To access a document regardless of the view, specify the document by its universal ID and substitute a zero (0) for the view name.
- DocumentName is the string, or key, that appears in the first sorted or categorized column of the view.
Use this syntax to open, edit, or delete documents and to open attached files. Domino® returns the first document in the view whose column key exactly matches the DocumentName.
There may be more than one matching document; Domino® always returns the first match. The key must match completely for Domino® to return the document. However, the match is not case sensitive or accent sensitive.
Note that View can be a UNID, or view name. In addition, the implicit form of any of these commands will work when appropriate. For example, you can omit the OpenDocument argument in a URL command and the document will still open because the command is automatically interpreted as OpenDocument.(EditDocument and DeleteDocument must be explicit commands.)
Examples
http://www.lotus-10.com/register.nsf/Registered+Users/Jay+Street?OpenDocument
http://www.lotus-10.com/register.nsf/0/466c5172561e1c5c852566c2005f6bbb?OpenDocument
Using @commands to link to a document
For information about using @commands in Web applications, see Features to Avoid Using in Web Applications.
Using Domino® URLs to access attachments
When Domino® saves a file attachment with a document, it generates a URL so it can retrieve the file later. An attachment generates a URL whose last component is the original file name. For example:
http://domino.lotus.com/domdown.nsf/ViewUNID/DocumentUNID/$File/DOMINO.EXE
ViewUNID can indicate a ViewID or a ViewName. DocumentUNID can be a DocumentKey. This allows you to create URL links to attachments by supplying a view name and document key.
By default, the browser uses the name specified in the URL to save the file.