Hi,
I have the following problem:
An agent in a mail in database should cleanup the database once a day and keap the latest document of all senders. I built a view where documents are sorted by posted date/time for cleanup. Here’s the code of my periodic agent:
Dim s As New NotesSession
Dim db As NotesDatabase
Dim ws As New NotesUIWorkspace
Dim doc, doc2 As notesdocument
Dim v As notesview
Set db = s.CurrentDatabase
Set v = db.GetView("cleanupview")
Set doc = v.GetFirstDocument
Set doc2 = v.GetNextDocument(doc)
Do While Not doc2 Is Nothing
If doc2.from(0) = doc.from(0) Then Call doc.remove(True)
Set doc=doc2
Set doc2= v.getnextdocument(doc)
Loop
THe problem is, that it works on the client but not on server. I always get the console error:
“Agent ‘Cleanup’ error: Error creating product object”
I tried different agent triggers, granted each kind of access, signed the agent, ran it on behalf of me,… Nothing I could do. What am I doing wrong? Any Ideas?
Cheers René