During application development, you may find that you are dealing with a database that contains numerous Profile Documents. Individual Profile Documents can be modified or deleted using the GetProfileDocument method, but this is a time-consuming process if there are thousands of Profile Documents. How can multiple Profile Documents be processed or deleted simultaneously?
For example, the following returns all profiles named "Profile-Name" from the current database:
In Notes/Domino 8.0 and later, the following agent script example would return and delete all profiles within the current database:
- Dim s as New NotesSession
Dim db as NotesDatabase
Dim col as NotesDocumentCollection
Set db = s.currentdatabase
Set col = db.GetProfileDocCollection("Profile-Name")
Call col.RemoveAll(True)
In Notes/Domino 8.0 and later, the following agent script example would return and delete all profiles within the current database:
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim col As NotesDocumentCollection
Set db = s.currentdatabase
Set col = db.GetProfileDocCollection
Call col.RemoveAll(True)
Messagebox"All Profiles Document Deleted"
End Sub
Comments
Post a Comment