Solved

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

Posted on 2000-03-31
4
378 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
  • 2
4 Comments
 
LVL 1

Expert Comment

by:bennyliaw
Comment Utility
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
Comment Utility
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 50 total points
Comment Utility
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
Comment Utility
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 your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now