Domino 9 und frühere Versionen > ND6: Entwicklung

DUID vom Hauptdokument beim Erstellen eines Antwortdokuments

(1/1)

DieterF:
Hallo,

ich erstelle über eine Aktion in einem View ein Antwortdokument mit:

Set NewUIDoc = uiworkspace.ComposeDocument( "", "", "ACTIONSTEP_D" )
Set NewDoc = NewUIDoc.Document
Call NewDoc.MakeResponse(apdoc)

Ich muss die Erstellung im Frontend machen, da im Backend die Wertübernahme aus dem Hauptdokument nicht funktioniert.

Mein Problem ist nun, dass beim Erstellen des neuen Dokumentes im Postopen Script abläuft, bei dem ich das Hauptdokument benötige. Mit

Set apdoc = source.Document.ParentDatabase.GetDocumentByUNID(source.Document.ParentDocumentUNID)

klappt es leider nicht. Ich erhalte die Fehlermeldung "Invalid universal id".

Hat jemand eine Idee, wie ich das Hauptdokument beim Ablauf des Postopen-Scripts bekomme, bevor das Antwortdokument gespeichert wurde?

Dieter

dirk_2909:
Hallo

Das Antwortdokument komplett mit LS erstellen.
Die benötigten werte kannst Du auch so übergeben:


--- Code: ---...
set coll = db.UnprocessedDocuments

set docMutter = coll.GetFirstDocument
..
set docDaughter = db.CreateDocument
...
Call docDaughter.ReplaceItemValue( "EinFeld" , docMutter.GetItemValue( "EinFeld" ) )
....

call docDaughter.MakeResponse( docMutter )
Call docDaughter.Save( TRue , True , True )
--- Ende Code ---

nur ein Beispiel

Navigation

[0] Themen-Index

Zur normalen Ansicht wechseln