Domino® URL Commands
A URL command combines a specific URL with a command that manipulates an item such as a document or view. Adding Domino® URL commands as HTML in forms gives users shortcuts for navigating databases and performing other tasks quickly.
The Domino® URL command syntax
Domino® URL commands have the syntax:
http://Host/DominoObject?Action&Arguments
Where
- Host = a DNS entry or an IP address
- DominoObject = a Domino® construct (for example, a database, view, document, form, navigator, agent, and so on).URL commands for accessing DominoObjects use the following syntax: http://Host/Database/DominoObject?Action&Arguments where Database = the database in which the DominoObject resides.
- Action = the desired operation on the specified DominoObject (For example, ?OpenDatabase, ?OpenView, ?OpenDocument, ?EditDocument, ?OpenForm, and so on).
- Arguments = a qualifier of the action (for example, Count = 10 combined with the ?OpenView action limits the number of rows displayed in a view to 10).
Syntax Guidelines
- Domino® URLs do not use the server name. Host identifies the server.
- You can specify the maximum size and other limits of a URL command in the Server record, in fields listed under the Internet Protocols -HTTP tab.
- Special identifiers used in Domino® URL commands include: $defaultView, $defaultForm, $searchForm, $file, $icon, $help, $about, and $first.
- DominoObject can be any of the following: for a database, the database name or replica ID; for other objects, the DominoObject's name, universal ID, or special identifier. For example, to specify a view in a URL, you can use any of the following: the view name, view universal ID, or $defaultView.
- An Notes® database can be specified by its file name, for example leads.nsf, or by placing a double underscore before the replica ID and adding an .nsf suffix to the end. For example,specify __852562F3007ABFD6.nsf
- A DominoObject's name and universal ID are identical in all replicas of a database. One name or alias can refer to two objects -- for example, two forms with the same name when one is hidden from Notes® users and one is hidden from Web users.
- Action can be explicit or implicit.Examples of explicit actions include ?OpenDatabase, ?OpenView, ?OpenDocument, ?OpenForm, and ?EditDocument. Examples of implicit actions include ?Open, ?Edit, and ?Delete. If you do not specify an action, Domino® defaults to the ?Open action.
- To require user authentication, append the Login argument to any Domino® URL.
- Because URLs cannot contain spaces, use the + (plus sign) or the
hex value %20 to represent a space. For example:
http://www.lotus-10.com/discussion.nsf/By+Author
Http://www.lotus-10.com/discussion.nsf/By%20Author
- If a name contains a mixture of spaces and the "+" character,
it may be necessary to use %20 to indicate the space. For example,
if the document's key is "Smith + Jones" then
http://www.lotus-10.com/leads.nsf/ByCompany/Smith%20%2B%20Jones?OpenDocument
and
http://www.lotus-10.com/leads.nsf/ByCompany/Smith%20+%20Jones?OpenDocument
will work but
http://www.lotus-10.com/leads.nsf/ByCompany/Smith+++Jones?OpenDocument
will not.
- Where a name or argument contains a symbol that is not part of
the URL syntax or would conflict with URL syntax, such as plus signs
(+), slashes (\ or /), or ampersands (&), use the escaped form
%xx (where xx is the hex ascii value) to represent the symbol. For
example, the following URL opens the document which has the key value
"Smith&Jones, Inc.":
Http://www.lotus-10.com/leads.nsf/By%20Company/Smith%26Jones,%20Inc.?OpenDocument
- Slashes and backslashes in URL path components are not distinguishable, even if escaped. (This is because the first step in URL processing is to unescape all escaped characters and to change '\' to '/'.) The result is that some names will be ambiguous or not addressable. For example while two views, one named "a/b\c/d" and the other "a\b/c\d" are different in the designer, they cannot be named uniquely with a URL.
- Document keys containing slashes and/or backslashes are addressable
with the following restrictions:
- You must supply the ?OpenDocument command argument in the URL.
For example if the document key is "Smith/Jones" the following URL
will find the document:
http://www.lotus-10.com/leads.nsf/ByCompany/Smith/Jones?OpenDocument
but this one will result in "Error 404 - Entry not found in index":
http://www.lotus-10.com/leads.nsf/ByCompany/Smith/Jones
- The document title as stored in the database must use all "/" or "\". If it uses a mixture, it won't be found.
- Using slashes (both kinds) in view names along with slashes in document titles may result in ambiguities and "unreachable" documents. If you have a view named "a" which has a document in it titled "b/c", and a view named "a\b" which contains a document "c", the URL /database.nsf/a/b/c?OpenDocument will open the document in the view a/b.
- Document titles which begin or end with the "/" or "\" character won't be found.
- You must supply the ?OpenDocument command argument in the URL.
For example if the document key is "Smith/Jones" the following URL
will find the document:
- The percent character ("%") is not allowed in a URL, even in "escaped"
form. This is to help prevent attacks which attempt to mask their
intent by escaping the escape character.
- Separate arguments with an ampersand (&). For example:
http://www.lotus-10.com/leads.nsf/By+Salesperson?OpenView&ExpandView
- Separate hierarchical names with a slash (/). For example, to
open a view named Docs\By Author in a database named Discussion, enter:
http://www.lotus-10.com/discussion.nsf/Docs/By+Author
- If you are generating your own URLs for any part of an application, use simple aliases whenever possible to avoid URLs with unsupported characters.
- URL commands may also refer to databases with .nsf4, .nsf5, .nsf6
or .box suffixes. They may also refer to template files (.ntf), but
these databases can only be opened in preview mode.
- Selecting "Web access: Use JavaScript™ when generating pages" in Database properties will enable you to compute URLs attached to buttons and hotspots on the Click event. If this option is not selected, URLs attached to buttons and hotspots will be computed when the page is generated. Enabling this property can be useful if you're using editable fields on a form.