PermaLink Domino Document Locking: thank you, Chad!04/27/2006
LotusScript
Since I started as a full-time employee for my current employer last August, I've had more work than I can shake a stick at. In fact, I could shake sticks with both hands and it wouldn't make a difference! An example of this is a project that has been on the back-burner for the past eight months. The project involves creating a web-enabled Notes application that will serve as the mechanism whereby employees will be able to search for and request books, videos, DVDs and audio cassettes from the Training Resources department. Essentially, the application will function as a library database. The database was created a contractor on staff before I arrived, and it was roughly 80% complete when he left.

When the contractor was working on the database, the only Domino server in production with the HTTP task running was R5. Since the application was supposed to have been rolled-out in a month or so, the contractor couldn't reference any of the document locking features available in V6. The Domino server was subsequently upgraded to V6.5 last September, making it possible for me to upgrade the application so that it uses document locking to prevent replication conflicts when resources are being checked out and checked in. As luck would have it, I was assigned to several high-priority projects for various clients within my organization, and its only now that I finally have a window where I can start working on this database again.

I have used document locking before, in several Notes client apps, but never for a Notes application accessed only by web browsers. While the Notes client will automatically lock a document once its opened in edit mode, the Domino server does no such thing. Instead, you need to code all of the document locking and unlocking yourself. This requires performing the same lock and unlock statements over and over again. Since document locking has been available since V6 was released back in October '02, I thought there would be a multitude of articles on this topic. This was not the case. The Lotus Advisor articles I found both used manual locking techniques that were the only way you could implement document locking back in the R4 and R5 days. James Ray's article in the September/October issue of The View provides an excellent examination of how document locking works in all possible scenarios. He does provide LotusScript code that enables you to programmatically work with document locking, but I felt I'd need to add more code for it to handle all of the things I would need.

Fortunately, Chad Schelfhout took the time to create a custom LotusScript class that contains all of the methods and properties I could ever ask for. I've already started adding it to several of the LotusScript agents that will be invoked by web users to edit, check out and check in library resources. Way to go, Chad!
Comments :v

1. Chad Schelfhout05/23/2006 01:21:46 AM
Homepage: http://www.chadsmiley.com


Any chance that you would be willing to share how you implemented it for the web? Just curious




2. Michael Sobczak05/23/2006 07:57:06 AM
Homepage: http://www.punkdbynotes.com


Hey Chad,

I'm contemplating doing an article on it. I would definitely give you as much credit as possible for coming up with that custom class. I'm not sure when the article would appear, as I have a two-parter currently on my schedule. Once I get them done, I'll know whether I'll have time for a full-fledged article on doc locking via the web or not.




3. Bojana Gnjato06/01/2009 02:44:47 PM


Hi, Michaele ... I red post about LotusScript class for locking document and have some questions for you?
I have Notes application (accessed only by web browsers) and I need next funcionality:
User 1 : open document in edit mode.
User 2: can open same document in read mode and have button to unlock document. After click on unlock button read mode change in edit for user 2, and inversely for user 1.

I paste this class in script libery.. how and where i can invoke function.

Thank's

Bojana




4. amit awasthi03/08/2011 12:18:45 AM


HI,
I am also facing the same issue. How can I lock document on web. Can we restrict scheduled agent to access the document while edited by a person.




Credits
NuTechs Powered by Domino
Search
Calendar
February 2012
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Monthly Archive
Get Real, Detroit!
Real Detroit Weekly
SWARM
Service
With
A
Rapid
Motion


-- old Rally's Hamburgers credo
Lotus Domino ND6 RSS News Feed RSS Comments Feed Podcast Feed Geo URL netcraft RSS Validator Lotus Geek Chris. A. Brandlehner Open Notes Picture Database OpenNTF CoComment Integrated BlogSphere
By Category
The BlogRoll
About
Contact Me
Contact me, Michael Sobczak, using this e-mail address:

my first initial my last name at Yahoo dot com
Recent Entries
No Recent Blogs
Powered by
Blogsphere