I’m working on a Domino application where I’m calling an agent using the database/agent?OpenAgent syntax. When doing this, what does session.DocumentContext contain? It isn’t the document I had open in the browser - I can get it by passing the DocUID as a paramater to the agent, but I had expected it to work like in a WebQueryClose agent and contain the document the browser had open.
Subject: It has an almost blank document containing the CGI variables such as Query_String
Subject: DocumentContext
Here’s a reference entry I created in the R4 & R5 forum:
http://www-10.lotus.com/ldd/46dom.nsf/0/9ed084a3d9e7dc0b85256f34004342f4
It should tell you what you can expect where and when on the web.
Subject: DocumentContext
I am not aware of a WebQueryClose event, but if you call the agent from the WebQuerySave event, the DocumentContext is in fact the document you were editing.You could also call your agent with the ?openagent syntax and pass your documentuniqueid parameter in the url (e.g. ?openagent&id=DOCUNIQUEID. In a script agent, you can then parse the id from the string in doc.path_info(0), where doc = s.documentcontext.
Does this help?
Erwin
Subject: DocumentContext
From the help:
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 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.)
Regards,
Rene