Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-11-29
9
Medium Priority
?
1,628 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Industry Leaders: 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!

Question has a verified solution.

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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

730 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