Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Domino 7 Application Development

You're reading from  Domino 7 Application Development

Product type Book
Published in Jan 2007
Publisher Packt
ISBN-13 9781904811060
Pages 228 pages
Edition 1st Edition
Languages

Table of Contents (18) Chapters

Domino 7 Application Development
Credits
Foreword
About the Authors
About the Reviewer
Preface
A Short History of Notes and Domino New Notes 7 Client and Domino 7 Server Features Lotus Notes/Domino 7 and DB2 New Lotus Domino Designer 7 Features Upgrading Domino Applications Upgrading Formulas Upgrading Agents and LotusScript Web Services and Domino 7 Optimizing Application Performance Code Samples Troubleshooting Applications Vendor Tools

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...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}