Another common situation is one where some (or all) users need to be prevented from being able to edit documents but these users are still allowed to see the documents. Although you can use AuthorNames fields in many situations, this means that users have Author access in the ACL (Access Control List), sometimes more access is required for an application.
An example might be an application where users are allowed to make certain document edits (for instance, from the view using InViewEdit), but otherwise should be restricted from editing documents. By using the PostOpen
and QueryModeChange
events, you can prevent users from entering into Edit mode, with the following message box appearing:
The code for this is as follows:
Sub Postopen(Source As Notesuidocument) If source.EditMode Then Dim doc As notesdocument Set doc = source.Document If doc.EditAllow ( 0 ) = "0" Then Messagebox "You are not allowed to edit this document.", 64, "Information...