Aus der Hilfe habe ich folgenden Code (leicht abgewandelt):
Dim parentDoc As NotesDocument
Dim responseDoc As NotesDocument
Set parentDoc = view.GetFirstDocument
' Visit each main document in the view
While Not ( parentDoc Is Nothing )
Set responseDoc = view.GetChild( parentDoc )
' Visit each of the parent's response documents
While Not ( responseDoc Is Nothing )
responseDoc.ExpireDate = Cdat(askme)
Call responseDoc.Save(True, False)
Set responseDoc = view.GetNextSibling( responseDoc )
Wend
' Put the new total onto the parent document
doc.ExpireDate = Cdat(askme)
Call parentDoc.Save( True, False )
Set parentDoc = view.GetNextSibling( parentDoc )
Wend
Bei Set parentDoc = view.GetNextSibling( parentDoc )
bricht der Agent mit "Eintrag im Index nicht gefunden" ab.
In der Hilfe steht dazu:
If the specified view is different from the current view, the GetNextSibling method returns the following error: "Document not found in <view>." That is, you can only navigate using the Document parameters that are from the same view in which you are navigating.
Ich hab doch nur 1 View, es gibt keine andere in diesem Agenten. Auch wenn ich die angegebene View as Default kennzeichne, bricht der Agent da ab.
Kann mir jemand helfen?
Matthias
Der Code bricht mit dem selben Fehler bei "view.getnextdocument(doc)" ab
Set doc = view.GetFirstDocument
If Not doc Is Nothing Then
'%REM
Dim parentDoc As NotesDocument
Dim responsecoll As NotesDocumentcollection
Set parentDoc = view.GetFirstDocument
' Visit each main document in the view
While Not ( parentDoc Is Nothing )
Set responsecoll = parentDoc.Responses
If Not responsecoll.Count = 0 Then
Call responsecoll.StampAll("ExpireDate",Cdat(askme))
End If
doc.ExpireDate = Cdat(askme)
Call parentDoc.Save( True, False )
Set parentDoc = view.GetNextDocument(parentDoc)
Wend
Liegt es an meiner Ansicht? Die erste Spalte ist sortiert, keine Kategorie...
Matthias
Richtig, und es muss auch Set parentDoc = view.GetNextDocument(parentDoc)
heissen.
Trotzdem bricht der Kram ab!
Matthias
Das war der richtige Schubser!
Das ist meine Ansichtsauswahl SELECT (Form = "Ticket") & (status = "geschlossen" | status = "verworfen" & @Adjust(closedatum;4;0;0;0;0;0) < @Date(2008;1;31) & ExpireDate = "") & (!@IsResponseDoc)
Wenn ich ExpireDate fülle, fliegt das doc ja aus der Ansicht!
Traumhaft, ich bin so bescheuert!
Danke für die Hilfe!
Matthias