PermaLink Someone else modified this document at the same time.05/31/2006 11:01 AM
LotusScript
A new feature with V6 is Soft Locking. Soft Locking is a server setting that prevents a user from editing a document someone else is currently editing on the same server. Until today, I didn't know that you can't copy a document that has a soft lock using LotusScript. I wrote an agent that copies documents from one database to another. The code looks like this:
Dim session As NotesSession Dim currDb As NotesDatabase Dim qaParent As NotesDocument Dim prodParent As NotesDocument Dim qaDB As NotesDatabase Dim v As NotesView Dim i As Integer On Error Goto errorHandler Set session = New NotesSession Set currDb = session.CurrentDatabase Set qaDB = session.GetDatabase ( "QAServer/CMA", "somedb.nsf" ) Set prodDb = session.GetDatabase ( "PRODServer/CMA", "somedb.nsf" ) Set v = qaDB.GetView ( "Main" ) v.Refresh v.AutoUpdate = False Set qaParent = v.GetFirstDocument Do Until ( qaParent Is Nothing ) i = i + 1 Print "Processing doc: " & i Set prodParent = qaParent.CopyToDatabase ( prodDb ) Set qaParent = v.GetNextDocument ( qaParent ) Loop Msgbox "Processing complete" End Sub
This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at nsftools.com.


However, every time I ran the code, I kept getting this error message:

Someone else modified this document at the same time

So I needed to find the user who had a document open in edit mode and have them save and close it. Then my code worked fine. Nice that this is documented somewhere... ; + )
Comments :v

No documents found

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