resolve (NotesSession - JavaScript™)
Returns the Domino® object that a URL addresses.
Defined in
NotesSessionSyntax
resolve(url:string) : NotesBase
Parameter | Description |
---|---|
url |
A URL that addresses a Domino® object. |
Return value | Description |
---|---|
NotesBase |
A NotesDatabase , NotesView , NotesForm , Document ,
or NotesAgent object. You must cast the return value
to the expected type. |
Usage
The general forms of URLs that address Domino® objects are as follows:protocol://host/database?OpenDatabase
protocol://host/database /view?OpenView
protocol://host/database /form?OpenForm
protocol://host/database /document?OpenDocument
protocol://host/database /agent?OpenAgent
For
local calls, the protocol is "notes" and the host is empty so that
the URL starts with notes:///
("notes," colon, and
three slashes).The database can be specified by name or replica ID. The name can include spaces (you can substitute plus signs for the spaces but it is not necessary). The name need not include the type suffix if it is NSF. The replica ID can be specified as the 16-digit ID by itself or the 16-digit ID prefixed by two underscores and suffixed by the file type (for example, NSF).
The view, form, document, or agent can be specified by name, universal ID, or note ID (not recommended because note IDs change between replicas).
The action (following the question mark) must be specified.
You can use getURL to specify the URL for the database.
See "Domino® URL Commands" in Application Development with Domino® Designer for additional information about the construction of URLs.
Examples
This computed field gets the URL for the current database and resolves it.var theURL = database.getURL();
var target:NotesDatabase = session.resolve(theURL);
return theURL + " " + target.getTitle()
var theURL = "notes:///" + database.getFileName() + "?OpenDatabase";
var target:NotesDatabase = session.resolve(theURL);
return theURL + " " + target.getTitle()
var theURL = "notes:///" + database.getReplicaID() + "?OpenDatabase";
var target:NotesDatabase = session.resolve(theURL);
return theURL + " " + target.getTitle()