My xPage SSJS fails in line:
viewEntry = view.getNext(viewEntry);
with error
Notes error: Entry not found in index
I do have this options set to false but it doesn't help:
view.setAutoUpdate(false);
So I suspect that it fails because user has not access to NEXT document because of reader access set. So such document cannot be seen in the view but in TOTALS. How to fix it?
The side problem is that if crashes Domino server then
Here is my code:
var view:NotesView = database.getView("xxxxxxx");
view.setAutoUpdate(false);
var viewNav:NotesViewNavigator = view.createViewNav();
var viewEntry:NotesViewEntry = viewNav.getFirst();
while (viewEntry != null) {
if (viewEntry.isCategory()){
// I work with category entry data
} else if(viewEntry.isTotal()){
// I collect totals
} else {
// I work with view entry
}
var tmpEntry:NotesViewEntry = viewNav.getNext(viewEntry);
viewEntry.recycle();
viewEntry = tmpEntry;
}
It fails in line: viewNav.getNext(viewEntry)
Script interpreter error, line=1001, col=37: [TypeError] Exception occurred calling method NotesViewNavigator.getNext(lotus.domino.local.ViewEntry)
Notes error: Entry not found in index ((xxxxxxx))
tmpEntry:NotesViewEntry = viewNav.getNext(viewEntry);
So how do I really go to next entry if current or next one is invalid?
viewEntry = viewNav.getNext(viewEntry);
. But there is noviewEntry = viewNav.getNext(viewEntry);
line of code in your example. Make sure that you provided correct example, please. – Hydrolyze