Hola.
Es un recurso que aún no he experimentado, pero lo cierto es que LotusScript dispone de recursos para identificar si es una vista privada o publica y, en su caso, si se desea eliminarla.
En el código de muestra 1 te muestro cómo podría identificarse a una vista privada.
Por otro lado, te adjunto una TECHNOTE de Lotus por si te sirve de ayuda.
Cómo eliminar vistas privadas
También debe ser importante la ubicacion de la BD, si está en un servidor, si esta en una replica, si el usuario tiene o no la capacidad de poder borrar, etc.
Suerte y si te funciona, haznoslo saber.
Codigo de muestra 1
Dim session As New NotesSession
Dim db As NotesDatabase
Dim outline As NotesOutline
Dim oe As NotesOutlineEntry
Set db = session.CurrentDatabase
Set outline = db.GetOutline("products")
Set oe = outline.GetFirst()
If oe.IsPrivate Then
Messagebox "This entry is private."
Else
Messagebox "This entry is public."
End If
Technote (FAQ)
Question
In Lotus Domino®, is it possible to delete a private or personal "On First Use" view using LotusScript?
Answer
This issue was reported to Quality Engineering as SPR# MMQN693EK7.
In Lotus Notes®/Domino, you can remove your own private and personal "on first use" views that are stored in the database using LotusScript. To do this, use the GetView method or the Views property (of the NotesDatabase class) and the Remove method (of the NotesView class). Refer to the sample scripts below.
It is not possible to remove private views that are stored in the desktop.dsk database. For information on removing a single user's private and personal "on first use" views that are stored in the database, refer to Document #1093742, "How to delete private views stored in the server database in Notes."
NOTE: If you attempt to remove a personal "on first use" view that is stored in desktop.dsk or you attempt to remove the original design element of a personal "on first use" view, the following error message displays:
"Notes error: Index is not to be generated on server ( <view name>)"
Supporting information:
NOTE: The sample scripts below illustrate one way to approach this issue. They are to be used as is and at your own risk. In order for the examples to perform as intended, the scripts must be laid out exactly as indicated below. Product Support cannot customize scripts for specific environments or applications.
Sample script #1 illustrates how to remove a personal "on first use" view, named My View. The check on the Readers property is used to differentiate the personal view from the original design element.
NOTE: Cycling through the Views property of the NotesDatabase class will not return the private/personal version of a folder stored in desktop.dsk. It returns a handle to the master shared copy of the folder.
Sample script #1:
Sub Initialize
-
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Set db = session.CurrentDatabase
Set view = db.GetView( "My View" )
If Not(Isempty(view.Readers)) Then
-
End Sub
*********************************************************************
Sample script #2 removes all views in the database that contain a Readers field, including those that belong to users other than the current user. In order to remove all private views based on My View, you must access the database on the server as Local and the ACL property, "Enforce a consistent ACL", must
not be checked.
Sample script #2:
Sub Initialize
-
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Forall vw in db.Views
-
If (vw.Name="My View") AND (Not(Isempty(vw.Readers))) Then
-
End If
End Forall
End Sub
Related information
How to delete private views stored in the server databa