Manage Learn to apply best practices and optimize your operations.

Prevent User From Deleting Document

To prevent user from deleting certain documents, we can use QueryDocumentDelete
event in database script. For example, to prevent documents with Status field
set to Unprocessed to be deleted, following code can handle that
Sub Querydocumentdelete(Source As Notesuidatabase, Continue As Variant)
Dim coll As NotesDocumentCollection
Set coll = Source.Documents
Dim doc As NotesDocument
Set doc = coll.getFirstDocument()
While Not doc Is Nothing
If doc.UnProcessed(0) <> "" Then
Msgbox "You are not allowed to delete Unprocessed documents"
Continue = False
Exit Sub
End If
Set doc = coll.getNextDocument(doc)
Wend
Continue = True
Exit Sub
End Sub

Dig Deeper on Domino Resources - Part 4

SearchWindowsServer
Search400
  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

SearchDataCenter
SearchContentManagement
Close