The problems seems to indicate one of the date fields is not being filed. I would suggest using agent logging and error checking to find the problem.
This code will show the line and actual error, it should help. Take a look at agent logs for the future.
On Error Goto ErrorHandler
Set db = session.currentdatabase
Set view = db.getview(“VueTout”)
Set doc = view.getfirstdocument
Set nowD = New NotesDateTime(“Today”)
view.autoupdate = False
Do While (Not doc Is Nothing)
Set creatD = New NotesdateTime(doc.GetFirstItem(“Date”).text)
difference = nowD.TimeDifference(creatD)
If (difference / 86400) > 60 Then
Call doc.ReplaceItemValue(“Statut”, “Archive”)
Call doc.Save(True, True)
End If
Set doc = view.getnextdocument(doc)
Loop
view.autoupdate = True
exit sub
ErrorHandler:
ErrorMsg = “Error# ” & Err & | – | & Lsi_info(2) & ” called by ” & Lsi_info(12) & “(” & Lsi_info(430) & “): ” & Error$ & ” – Line: ” & Cstr(Erl)
print ErrorMsg
Resume Next
Discuss This Question: 2  Replies