Book Image

Domino 7 Application Development

Book Image

Domino 7 Application Development

Overview of this book

Written by Lotus insiders, the book provides a practical guide to developing applications making use of the important features and enhancements introduced in Notes/Domino 7. These experienced experts use their own experiences to map out the benefits you could gain, and the dangers you may face, as you develop Domino applications in your business. Written by specific experts, edited and overseen by Lotus content generator Dick McCarrick, this book is the definitive guide to developing Domino 7 applications. TECHNOLOGY Domino is an application server that can be used as a standalone web server or as the server component of IBM's Lotus Domino product which provides a powerful collaborative platform for development of customized business applications. It also provides enterprise-grade email, messaging, and scheduling capabilities.
Table of Contents (18 chapters)
Domino 7 Application Development
Credits
Foreword
About the Authors
About the Reviewer
Preface
Free Chapter
1
A Short History of Notes and Domino

Preventing Editing of Fields and Documents Dynamically


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...