Solved

Notes error: Invalid or nonexistent document  ; when unlocking a document

Posted on 2010-11-29
9
1,624 Views
Last Modified: 2013-12-18
This question is related to this question:
http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/Lotus_SmartSuite/Lotus_Notes/Q_26551298.html

1. It was working last week and today it is giving me the error message
2. The form was created from a button that contains these code:
     @Command([FileSave]);
     @Command([Compose];"";"FlexRepairProcess");
3. The FlexRepairProcess form created and saved just fine but when I close the form, the code stops at the Queryclose event when it tries to unlock the document
     Sub Queryclose(Source As Notesuidocument, Continue As Variant)
       Dim doc As NotesDocument
       Set doc = source.Document
       Call doc.UnLock
     End Sub

Again this has been working for almost 2 weeks and suddenly it stopped working. I googled this problem and most people have problem with their mail files and that's not the case with me.
0
Comment
Question by:coronoahcoro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 34232150
Do you have to unlock it explicitly, isn't the document automatically unlocked? Furthermore, why lock a new document?

If there is indeed a disk-based document (which I doubt), the error could be related to some sort of bug in Notes where it gets confused between two on-screen documents. Sometimes it's worth to grab NotesUIWorkspace.CurrentDocument instead of the Source parameter...
0
 
LVL 2

Author Comment

by:coronoahcoro
ID: 34232157
This happens only the very first time after the document is created, saved, and closed. The error doesn't show up anymore afterward. I can open and close document (+ unlocking it) just fine.
0
 
LVL 2

Author Comment

by:coronoahcoro
ID: 34232185
I had to do it explicitly because in the past when I tested this, there were times when a document is in locked status even though that doc was saved and close.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 34232399
I suppose it won't work on a new (or newly saved) document. Can you just leave the lock in that case? Or, dirty: add a line with
      On Error Resume Next
right before the line with Unlock...
0
 
LVL 2

Accepted Solution

by:
coronoahcoro earned 0 total points
ID: 34232518
I just changed the Queryclose event to
	Dim doc As NotesDocument
	Set doc = source.Document
	If doc.LockHolders(0) <> "" Then
		Call doc.UnLock
	End If

Open in new window


It looks like it is working just fine now...I'm going to run some tests on it.
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 34434058
Don't delete the question, for it might help someone else with a similar problem. Just accept your own answer.
0
 
LVL 2

Author Comment

by:coronoahcoro
ID: 34435176
ok will do. thanks
0
 
LVL 2

Author Closing Comment

by:coronoahcoro
ID: 34459459
This is what works in this case
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question