Manage Learn to apply best practices and optimize your operations.

Restrict Delete Access

Our sales force uses a replica copy of a Notes database. On the server they are not allowed to delete information, but the replica copy allows delete because Notes defaults manager rights on local copies, and you don't want to enforce a consistant ACL on the db for various reasons. Then use the following code to restrict delete access.


Create a db roles titled "DeleteAccess". Then add the following code to the Initialize event in database script under other.

Dim session As New notessession
Const NotesMacro$ = "@UserRoles"
result = Evaluate(NotesMacro$, doc)
Callsession.setenvironmentvar("NoDel",result(0))

Then in the Querydocumentdelete event add the following code.

Dim session As New notessession
Dim Workspace As NotesUIWorkspace
result$=session.GetEnvironmentString("NoDel")
If result$ = "[DeleteAccess]" Then
Exit Sub
Else
Msgbox "You are not allowed to delete",0+16+0+0,"Record Deletion Error"
Continue = False
End If

This code will not allow deletion for any reason on local copies of databases, but will allow deleteion on the server for all who have the DeleteAccess roles.

Dig Deeper on Domino Resources - Part 7

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close