Domino Code Fragment

Code Name*
Removing a View from a Database using the NotesView method, Remove.
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.142.171.180
Description*
It is possible to remove a view entirely from a database. To accomplish this, use the NotesView method, Remove .
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
It is possible to remove a view entirely from a database. To accomplish this, use the NotesView method, Remove. This method is simple, yet dangerous to use. Once Remove has been executed, the view is permanently gone! For this reason, an example is listed below, but no button for executing the script is available.

Dim session As New NotesSession 'Declare session as a new Notes session
Dim db As NotesDatabase
'Declare db as a Notes Database
Dim view As NotesView
'Declare view as a Notes View
Set db = session.CurrentDatabase
'Set db to the current Notes database (open)
Set view = db.GetView("Main View")
'Set the Main View to the object view
Call view.Remove 'Remove Main View from the database