Das Notes Forum
Domino 9 und frühere Versionen => Entwicklung => Thema gestartet von: robertpp am 14.02.03 - 09:09:03
-
Ich hab dazu diesen eintrag gefunden:
http://www.atnotes.de/index.php?board=7;action=display;threadid=2465
Ich kann auch ein Anwortdoc erstellen per @Formel !
Aber wie kann ich ein anwortdocument automatisch bei speichern des parentdocs erzwingen?
Habs mal so probiert:
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim uiws As New NotesUIWorkspace
Dim doc As NotesDocument
Dim uidoc As NotesUIDocument
Set db = session.CurrentDatabase
Set doc = New NotesDocument(db)
Set uidoc= uiws.currentDocument
doc.Form = "his"
doc.SaveHistory = uidoc.FieldGetText("SaveHistory")
Call doc.Save(True, False)
End Sub
Aber wie sag ich dem doc jetzt das es ein anwortdoc von dem aktuellen doc ist?
robertpp
-
Ich glaub ich war zu voreilig!!!
ich probies mal mit
Call docB.MakeResponse( docA )
docB.Form = "Response"
robertpp
-
Wie kann ich aber jetzt statt
Call docB.MakeResponse( docA )
docB.Form = "Response"
docA das currentDocument auswählen?
Oder ist es vielleicht möglich im anwortdoc das $REF feld zu erstellen und in dieses feld dan die DOCUNIDID hineinschreibe vom hauptdic?
robertpp
-
Oder ist es vielleicht möglich im anwortdoc das $REF feld zu erstellen und in dieses feld dan die DOCUNIDID hineinschreibe vom hauptdic
Nur zum Verständnis: das $REF Feld enthält bereits die DOCUNIDID des Parents vollautomatisch, wenn das Response auf Basis des Parents erstellt wird.
Leider kann ich den eigentlichen Part Deiner Frage nicht verstehen, weil ich nicht geschnackelt habe, wo genau nun Deine zu knackende Nuss liegt?
-
Mein Problem besteht darin das ich einfach ein doc erstellen per script:
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim uiws As New NotesUIWorkspace
Dim doc As NotesDocument
Dim uidoc As NotesUIDocument
Set db = session.CurrentDatabase
Set doc = New NotesDocument(db)
Set uidoc= uiws.currentDocument
doc.Form = "his"
doc.SaveHistory = uidoc.FieldGetText("SaveHistory")
Call doc.Save(True, False)
End Sub
nur soll dieses doc ein Antwortdocument von uidoc sein wo ich mich gerade befinde! (currentdocument)
Die unschöne variante es zu lösen ist:
@Command([FileSave]); Hauptdoc speichern
@Command([Compose];"his"); Antwortdoc erstellen
@Command([FileSave]); Antwortdoc speichern
@Command([FileCloseWindow]);
@Command([FileCloseWindow]) beide doc schließen
Dann sehe ich in meiner ansicht das antwortdoc kategorisiert zum hauptdoc.
bei der oben variante(lscript) weiß er aber nicht das er ein parentdoc hat und schreibt es einfach in die ansicht unten hinein!
-
... schau dir mal das NotesDocument-Object in der Hilf an, da gibt es eine Methode ein Dokument zum Antwort-Dokument eines anderen zu machen...
ata
-
hi,
füg das malinden codeein:
set hauptdoc = uidoc.document
Call doc.MakeResponse( hauptdoc )
Call doc.Save(True, False)
-
genau die zwei zeilen haben mir gefehlt!
danke forrest g
Endergebnis:
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim uiws As New NotesUIWorkspace
Dim doc As NotesDocument
Dim docH As NotesDocument
Dim uidoc As NotesUIDocument
Set db = session.CurrentDatabase
Set doc = New NotesDocument(db)
Set uidoc= uiws.currentDocument
Set docH = uidoc.document
Call doc.MakeResponse( docH )
doc.Form = "his"
doc.SaveHistory = uidoc.FieldGetText("SaveHistory")
Call doc.Save(True, False)
End Sub
robertpp
-
...klar...gerne...