Solved

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

Posted on 2000-03-31
4
389 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 50 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

738 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