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 and Domino 6 Programming Bible by Brian Benz, Rocky Oliver
Covers all the programming techniques, concepts, and languages used with Notes and Domino, as well as the many new features of Domino 6 Thoroughly examines the Notes and Domino role with Java, XML, Web services, and other IBM products and technologies Provides extensive code and examples, many geared to the needs of administrators High-profile authors, known to their audience through conferences and articles Companion Web site shows example applications from the book running on a live Domino server and provides code download.
See at: Amazon.co.uk | Amazon.com |