Hi all,I am doing a agent to change status of documents which pending for a period. After change the status, agent will send an notification email to applicant.The method of sending email is succesful before I add-in the method to change status.
The problem I facing now is, when my script get document 1 by 1 from a view, after the first document’s status changed, the agent failed to get the next document and then showing error = “Entry Not Found In Index (viewname)”. Can anyone tell me what is the main cause?
Thanks a lots!
Subject: Entry Not Found while read document from view
Hi,
Try to use AutoUpdate propety of NotesView object set to False.
Konrad
Subject: Entry Not Found while read document from view
It sounds like your view is sorted/based on the status. So when you change the status of a document and the view is refreshed the next document cannot be retrieved because the former document is no longer part of the view.
What you could do is first retrieve a pointer to the next document and then save the modified document like this:
set doc = collection.getfirstdocument
while not doc is nothing
[do your stuff]
set nextdoc = collection.getnextdocument(doc)
doc.save(true, false, true)
set doc = nextdoc
end while