GetNextDocument (NotesViewNavigator - LotusScript®)
Returns the next document entry in a view navigator.
Defined in
Syntax
Set notesViewEntry = notesViewNavigator .GetNextDocument( entry )
Parameters
entry
NotesViewEntry. An entry in the view. Defaults to the current entry. If you specify Nothing, this method generates an error.
Return value
notesViewEntry
NotesViewEntry. The document entry following the current or specified entry. Returns Nothing if there is no next document entry.
Usage
This method moves the current pointer to the retrieved entry unless the return value is Nothing.
When processing documents in a loop, do not delete the document, or modify it in a way that causes it to disappear from the view or for its position to change. In that situation, GetNextDocument method may not return a useful result because the document that was the next document, is now at a different position in the view. The most common symptom of this problem is that documents are skipped when you loop through them.
To address this issue, change your logic so that you call GetNextDocument before making any change to the document. Or, use NotesView.AutoUpdate (= False) to prevent re-indexing of the view while you're using it.