Link to home
Start Free TrialLog in
Avatar of didede
didede

asked on

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

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.
Avatar of bennyliaw
bennyliaw
Flag of Singapore image

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
Avatar of didede
didede

ASKER

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

ASKER CERTIFIED SOLUTION
Avatar of bennyliaw
bennyliaw
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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