JAVA/CORBA CLASSES

DocumentContext property
Example

Read-only. The in-memory document when an agent starts.

Defined in

AgentContext

Data type

Document

Syntax

public Document getDocumentContext()
   throws NotesException

Usage

For an agent activated in a view through the Notes client UI, the in-memory document is the document highlighted in the view.

For an agent run from a browser with the OpenAgent URL command, the in-memory document is a new document containing an item for each CGI (Common Gateway Interface) variable supported by Lotus Domino. Each item has the name and current value of a supported CGI variable. (No design work on your part is needed; the CGI variables are available automatically.)

For an agent run from a browser with @Command([RunAgent]) or @Command[ToolsRunMacro], the in-memory document is the current document. In the case of WebQueryOpen, this is the document before Lotus Domino converts it to HTML and sends it to the browser; in the case of WebQuerySave, this is the document before Lotus Domino saves it. If the form on which the document is based contains a field named the same as a Lotus Domino-supported CGI variable, the in-memory document also contains the value of that variable. (You must explicitly design the CGI variables into the form, for example, as hidden fields.)

See "Table of CGI Variables" in Application Development with Domino Designer for a list of the Lotus Domino-supported CGI variables.

Through the C or C++ API, an external program can create an in-memory document, then run an agent. The agent can use this property to access the in-memory document.

You cannot use the encrypt and remove methods on the Document object returned by getDocumentContext, nor use the compact method on the Database object that contains the Document object returned by getDocumentContext.

Language cross-reference

DocumentContext property in LotusScript NotesSession class

Example
See Also