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

x
?
Solved

lock and unlock doc. with Domino Notes V5 (Web client)

Posted on 2000-03-31
4
Medium Priority
?
399 Views
Last Modified: 2013-12-18
Hi,

I want to lock and unlock doc to avoid save conflict.
I can use an lock document and remove it when the user save the normal document.
My question is how to indicate that the document is locked ?
Mask the modification link ?
Show a message but how (javascript ?)

I think is not trivial with web client.

Thanks for a quick answer.
0
Comment
Question by:didede
[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
  • 2
4 Comments
 
LVL 1

Expert Comment

by:bennyliaw
ID: 2675787
You can have a field to hold the flag whether the document is locked, and another field to hold the user who lock it.
You can design such that the user will open the document in read mode first, click on "Edit Document" action hotspot to edit the document and submit the changes after that.

In the "Edit Document" hotspot instead using @Command( [EditDocument] ) you will call an agent and pass in the document unique id. In the agent you will need to check whether the document is locked, if it is not locked, the agent will lock the document and redirect to Edit Document url. Upon submission you will unlock the document using QuerySave agent. If the document is lock you can write a javascript alert to show the message and go back to the previous page (or you can also hide the modify link based on the setting in the lock flag)

One more think to take care is that you may want to have a function for the administrator to release the locked documents. Just in case the user lose the connection after locking a document. Or alternatively you can write an agent to unlock the locked documents that are not modified after certain time (say 2 hour or something)

That's just the idea. Let me know if you think that will work and if you need me to write the sample scripts.

--benny
0
 

Author Comment

by:didede
ID: 2679812
Hi,

The idea seems good.
but i dont know how to link this steps

1. If the document is lock  - Domino Test !-
2. you can write a javascript alert to show the message - Javascript action !-
3. and go back to the previous page -Domino or Javascript action ?-.


Thanks

0
 
LVL 1

Accepted Solution

by:
bennyliaw earned 150 total points
ID: 2680713
Ok,

Let say the edit document hotspot calls CheckIfLock Agent.
In CheckIfLock Agent you can have something like this:

' .... parse the query string to get DocUNID

' .... set doc to the document identified by DocUNID

if (doc.IsLocked(0) ="1") then '-->If the document is locked
  print "<script>alert('The document is being locked, please wait until it is released'); history.back(); </script>"     '-->javascript alert and back
else
  ' lock the document and modify it
  doc.IsLocked = "1"
  Call doc.Save( True, True )
  print "[/yourdb.nsf/yourview/yourDocUNID?EditDocument]"    '-->redirect
end if
0
 
LVL 1

Expert Comment

by:stharris
ID: 2682083
didede,

Domino.Doc is the best solution for documnet management with-in Lotus Domino.  Albeit, depending on the criticality of your need and the budget you have this might be a little overkill.


St. Harris
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

715 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