ajcooper
ajcooper

Reputation: 239

XPages search returning undefined viewEntry

I have a custom control which contains a view which be searched by passing in a value in the ?search parameter. In most cases everything works as expected. However, some results contain a single undefined viewEntry. This always appears as the last entry on the first page regardless of the number of results returned. The same search in the Notes client doesn't show any empty documents, nor are there any conflicts in the database.

I've managed to work around the error by checking for typeof viewEntry == undefined but would like to get to the bottom of why this is happening.

Upvotes: 0

Views: 179

Answers (2)

Gregor Ibic
Gregor Ibic

Reputation: 89

Check if you have response/conflicts documents that are not displayed in view. You can uncheck the Show Response Documents In Hierarchy and check the results.

Upvotes: 0

Lauri Laanti
Lauri Laanti

Reputation: 978

Do you set the view's AutoUpdate property to false before doing your search? If not, please try that.

Upvotes: 1

Related Questions