Notes Ninjas Notes Ninjas
Lotus Notes hints, tips, error messages
Server error: Entry not found in index when composing new document from form

Hint Short Cut: Add this to your code & documentation to help you find this page.
http://www.notesninjas.com/#ComposeEntryNotFoundError or http://www.notesninjas.com/A555F9/nn.nsf/ByAlias/ComposeEntryNotFoundError


The problem seems to be the view selection formula.

 

 

 





The problem seems to be the @function that is composing the form which could only be one line ie:

@command([Compose];"Contact")

fails with the error.

 

If you have a user that this happens to every so often and you cannto initially recreate it try in a different view, may be a view that is restricted to a subset of forms.

The error is because the view does not show the Composed form.

One solution is to change the view selection formula, but here is another solution:

This code temporarily opens up the AllDocsByUnid view, you need to create this view, it is basically SELECT @ALL and has first column sorted and

a formula equal to:

@text(@documentuniqueid)

 

So the Compose Form action button then is:

r:=@Text(@DocumentUniqueID);

db:="CN=Server1/O=Notes":"db.nsf";
@Command( [FileOpenDatabase]; db   "AllDocsByUNID" ; r; "1" );
@Command([Compose];"Contact");
@Command( [FileOpenDatabase]; db   "AllDocsByUNID" ; "" ; "0");
@Command([FileCloseWindow])

 

This code opens up the view to the current document, useful for inherited @Compose forms and then composes the form and then closes the view.

There is no flicker of the view.

NB It might be worth hard coding the database name and server instead of using "" as it seemed to fail with one user who used bookmarks.

Using @dbname did not work.

Here is the lotusscript version of the code:

 Dim uiw As New notesuiworkspace
Dim uidoc As notesuidocument
Set uidoc=uiw.currentdocument

Dim db As notesdatabase
Set db = uiw.GetCurrentDatabase.database

Call uiw.OpenDatabase( db.server,db.filepath, "AllDocsByUNID", Cstr(uidoc.document.universalid), True )

Call uiw.ComposeDocument(db.server,db.filepath, "CoP")
Call uiw.OpenDatabase(db.server,db.filepath, "AllDocsByUNID", Cstr(uidoc.document.universalid), False )
Call uiw.currentview.close()

  Hope that helps!

 

 Jump to:     Notes Tips
    Lotus Notes Index 
  Register for Tips
Previous Lotus Notes Tip 
    Next Lotus Notes Tip
Your company logo here?
Adam Foster
Free Cash Making Web Site
Free Revenue Earning Blog Site
 Free Revenue Earning Newsletter Site   
Free Search Pages Free Web stats
Free Contact Us page
Cheap .com domain names
 Need a website or 
   Lotus Notes
  problem solved?
Adam Foster
Lotus Notes 5 All-in-one Certification Exam Guide by Libby Schwarz, Ben Malekzadeh
Sort out your CLP with this book.
See at: Amazon.co.uk | Amazon.com |