Friday, September 28, 2007

Entry not found in index

If you're trying to open a document from a view, using a stored @Text(@DocumentUniqueID), that don't match the documents UNID, you may get "Entry not found in index" when trying to open the document from the web.

It seems the Domino Server "mistakes" a 32byte hexadecimal string to be the UNID of a document, and ignores the values in the first sorted column of the view.

The quick and dirty workaround is to add a character or two before the stored ID (e.g. "u_" + UNID), in the sorted column of the view, and in the links that point to documents in the view.

The best-practice solutions is for fix the application, and remove a stored UNID as a lookup-value. The simplest alternative is @Unique.


Unknown said...
This comment has been removed by the author.
Unknown said...

Thank you
but in very particular situation @unique doesn't return a unique value

Tommy Valand said...

I'm well aware of that @Unique can fail, but it's very unlikely to do so.

I'm simply promoting @Unique as the simplest alternative. In my book, the simplest alternative is often the best.