Domino 9 und frühere Versionen > ND6: Entwicklung
ParentDocumentUNID aus Back-End bekommen??
cfiber:
Hallo,
ein klitzekleines Problem plagt mich:
Mit einem Agenten im Back-End versuche ich die ParentDocumentUNID von verschiedenen Dokumenten herauszubekommen, der Debugger meldet aber immer "Invalid Universal ID".
Mein Quellcode ist grob so:
Dim doc As NotesDocument
Dim parentdoc As NotesDocument
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Set dc = db.AllDocuments
Set doc = dc.GetFirstDocument
Set parentdoc = db.GetDocumentByUNID(doc.ParentDocumentUNID)
dc ist nicht leer und doc ist ein Antwortdokument.
Kann mir jemand helfen?
umi:
Wie sieht den deine ParentdocumentUNID aus? evtl. ist die leer?
Oder zeigt auf ein Parent das nicht mehr existiert?
cfiber:
habe die ID mal mit Prompt ausgeben lassen und die stimmt mit dem parent überein.
Und es existiert natürlich auch... ???
klaussal:
Copy & Paste aus der Hilfe: :D
--- Code: ---Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument, pdoc As NotesDocument
Dim docSubj As String, pdocSubj As String
Set db = s.CurrentDatabase
Set dc = db.AllDocuments
Set doc = dc.GetFirstDocument
While Not(doc Is Nothing)
If doc.IsResponse Then
Set pdoc = _
db.GetDocumentByUNID(doc.ParentDocumentUNID)
docSubj = doc.Subject(0)
pdocSubj = pdoc.Subject(0)
Messagebox "Parent: " + pdocSubj,, docSubj
End If
Set doc = dc.GetNextDocument(doc)
Wend
End Sub
--- Ende Code ---
cfiber:
hm hier wird ja auch nur gecheckt, ob das wirklich nen Antwortdoc ist. Aber die Collection, wo "doc" herkommt habe ich so gebastelt, dass es nur aus bestimmten Antwortdokumenten besteht.
Warum meckert der Compiler trotzdem??
Navigation
[0] Themen-Index
[#] Nächste Seite
Zur normalen Ansicht wechseln