Preventing edit document

Hi,

how can I do this: if the user clicks on a document in a view, the form does not open ?

Thanks and regards,

Bernd

Subject: Preventing edit document

You can either use $Readers field (if it has to be implemented for certain users) or write a script in Queryopen even of the form in which Continue=False if doc is not new.

Subject: Preventing edit document

I would prefer to use the event Queryopendocument of the view. So you are able to use the form to edit documents out of other views or actions…

Sub Queryopendocument(Source As Notesuiview, Continue As Variant)

Continue=FALSE

End Sub

Regards,

Daniel B.

Subject: Preventing edit document

If you are simply trying to stop a document being opened from a specific view displayed in the Notes client, then see the QueryOpenDocument event of the class NotesUIView.

QueryOpenDocument(Source As Notesuiview, Continue As Variant)

By setting Continue to False, you’ll stop the document being opened from the view.

Subject: Try this …

In the form in the postopen try:

Sub Postopen(Source As Notesuidocument)

Dim db As NotesDatabase

Dim uidoc As NotesUIDocument

Dim doc As NotesDocument

Dim workspace As New NotesUIworkspace

Dim session As New NotesSession



Set db = Session.CurrentDatabase

Set uidoc = Workspace.CurrentDocument



    Call uidoc.close

This will close the doc as it’s opened.

Hope this helps

Banksy