Deleting Private Views

If you have a database with views of the kind "Private on first use", changes
in design will not get through to the private copies of the view.
This script gets rid of the private copies of "Private on first use" views that
is stored in the database.
Put the code in the Queryclose event of the database if you want the private
copy of the view to be deleted every time the user exits the database.
Otherwise put the code in a scheduled agent.
Sub Queryclose(Source As Notesuidatabase, Continue As Variant)

Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim docView As NotesDocument
Dim itmFlags As NotesItem

Set db = session.CurrentDatabase

Forall v In db.Views
Set view = v
Set docView = db.GetDocumentByUNID( view.UniversalID )

If Not docView Is Nothing Then
Set itmFlags = docView.GetFirstItem( "$Flags" )
If Instr( itmFlags.Values( 0 ), "V" ) Then
Call view.Remove
End If
End If
End Forall


End Sub

This was last published in November 2000

Dig Deeper on Domino Resources - Part 3

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