Domino 9 und frühere Versionen > Entwicklung
Aktuelles Dokument im Web
Centaury:
Hallo Leute!
Wie komme ich in einem Lotusscript Agenten an das aktuelle Dokument? Der Agent wir vom WebQuerySave Event getriggert und soll überprüfen, ob das Doc neu ist oder schonmal gespeichert wurde.
Kann es sein, dass session.DocumentContext nicht bei neuen Docs funktioniert?
Was kann sonst der Fehler sein? Ich bekomme ein "Object Variable not set" im Client und ein "Type mismatch", wenn ich den Agenten auf dem Server laufen lasse. (Da soll er ja letztendlich laufen, weil Web...
Das aktuelle Doc wollte ich mir über DocumentContext holen, aber anscheinend existiert da nix...
HILFE!
ata:
... vielleicht liegt es an deiner Session, hast du sie mit
Dim session as New NotesSession
... initialisiert?
ata
Centaury:
Ja, habe ich :-\
Rob Green:
type mismatch kommt zB wenn ein Feld angesprochen wird, aber so nicht vorhanden ist. Dh. ohne Code kann man wenig sagen, was nicht gehen soll.
Laut HELP sollte document.context gehen:
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 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[ToolsRunMacro], the in-memory document is the current document. In the case of WebQueryOpen, this is the document before Domino converts it to HTML and sends it to the browser; in the case of WebQuerySave, this is the document before Domino saves it. If the form on which the document is based contains a field named the same as a 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.)
ata:
... kannst du den Code abgespeckt posten, dann kann ich versuchen zu debuggen...
ata
Navigation
[0] Themen-Index
[#] Nächste Seite
Zur normalen Ansicht wechseln