Notes Ninjas Notes Ninjas
Lotus Notes hints, tips, error messages
NotesDocument Save gives error "Note Item Not Found" in desktop stored views

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


Backend NotesDocument Save produces error "Note Item Not Found" in desktop stored views.





Backend NotesDocument Save produces error "Note Item Not Found" in desktop stored views.

This is a very annoying error.

It was supposed to be fixed in 4.67 according to Knowledge Base: 169633

I have found it in 5.07 clients, though.

Basically the error means that doc.save doesn't work if the code is called from a shared, private on first use view. Unfortuntely it works on some machines, but not others.

I have not worked out what configuration causes the problem yet.

Workaround: Use a shared view !

Another workaround that I am trying out is to get a document by its UNID, ie not from the view.

This seems to work!

Set col = db.unprocesseddocuments
Set doc = col.getfirstdocument

Do Until doc Is Nothing
 
 Set tempdoc = db.getdocumentbyunid( doc.universalid )

  tempdoc.Status="Approved"

  Call tempdoc.save(True, False)

  Set doc = col.getnextdocument(doc)
Loop
 

 

 Jump to:     Notes Tips
    Lotus Notes Index 
  Register for Tips
Previous Lotus Notes Tip, 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 |