An agent runs on schedule but does not work properly

Hi. I have a problem with a server agent which runs on schedule. it seems the agent runs on time, but it cannot get value properly.

the codes are below;

Dim s As New notessession

Dim db As NotesDatabase

Dim v As NotesView

Dim col As NotesViewEntryCollection

Dim ent As NotesViewEntry



Set db = s.CurrentDatabase

Set v = db.GetView("WHOrder")

Set col = v.AllEntries

num = col.Count

Print Cstr(num) + " documents found"

The view has 4 documents but the message shows 0 document.

It runs properly when it is run with notes client on server.

Thanks.

Subject: re: an agent runs on schedule but does not work properly

Hi Kasumi

Do the documents in the WHOrder view have “Reader” fields ? Is the server listed in the reader field, either explicitly or by group membership ?

regards

Simon

Subject: re: an agent runs on schedule but does not work properly

Hi Simon,

Thank you very much for your responce.

As you said, the documents have a reader field, but the admin server was not included in it. The agent is working properly after I added the server to “Admin” role.

Best regards,

Kasumi