Can i lock the document in web?

HI all, Can i lock the document in web?, if yes will normal document lock db property will help me, or i have to do seperate coding to lock in web, if coing where i ahve to do the coding,please suggets me

with regds

soma

Subject: can i lock the document in web?

How about in WEBQueryOPen event, Try coding in this. You have to look away to Unlock the document in Web.How about if the user close the browser with out completing the Unlock? No Idea…

Subject: RE: can i lock the document in web?

Hello ,

In one of our client databases, we ae maintaining a view where we keep all the documents of the database irrespective of the form and maintaining who is currently viewing the document .

When the user opens the document , that document in the view is saved with his name and if somebody else tried to open the document , he/she is prompted that “userA” is currently accessing the document. When the user closes the document , it removes his/her details from that document and the document is un-locked.

I’m not using the buil in Lock and unlock feature of Notes database , but this works perfectly.

This can be achived on a web db , as suggested by venu, to call an agent in WebQuery open which should first check if the document is being viewed by somebody , if yes show with an alert message using Javascript . And when the user closes the document , the document is “unlocked”.

Only thing what we have to achieve more is to ask the user to use always “Exit” or “Logout” button from ur datatabase and should be prohibited using the “Close” option of the web page .

HTH

Tom

Subject: can i lock the document in web?

The functionality is not built in because it’s normally triggered by the Notes Client, but you can have a webqueryopen which sets the appropriate doc locking fields and then the document wil be locked.

Note that this will prevent notes clients from editing, but browsers are still unaware, so every browser edit has to start with that webqueryopen which checks and then locks, else you will run into problems.

You’ll also need an event for when the user walks away from the document, whether it’s via button or just closing their browser in the middle of an edit. You’ll need to unlock the document. And of course it’s always possible that someone will have a browser crash somewhere else which causes all browser windows to close without letting your code run, so you need to think about how to unlock these docs when that happens.

There is a lot of business logic you need to go through, but the coding part isn’t that bad.

regards,

raphael