Manage Learn to apply best practices and optimize your operations.

Tracking Down Orphans

This agent makes it easy to find orphan documents. It runs through all documents in the database and tests each response doc it finds to make sure its parent can be located. If an orphan is found the document is placed in a folder called Orphan for easy retrieval.


Sub Initialize
Dim Session As New NotesSession
Dim CurDB As NotesDatabase
Dim DocColl As NotesDocumentCollection
Dim Doc As NotesDocument
Dim Parent As NotesDocument

Set CurDB = Session.CurrentDatabase
Set DocColl = CurDB.AllDocuments
Set Doc = DocColl.GetFirstDocument
While Not(Doc Is Nothing)
If Doc.IsResponse Then
On Error Goto Orphan
Set Parent = CurDB.GetDocumentByUNID(Doc.ParentDocumentUNID)
End If
Set Doc = DocColl.GetNextDocument(Doc)
Wend

Orphan:
Doc.PutInFolder("Orphan")
Resume Next
End Sub

Dig Deeper on Domino Resources - Part 5

SearchWindowsServer

Search400

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close