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.

3 comments:

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

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/70e6ce12e6ea5ef18525713f003443e8?OpenDocument

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.