My servers have several mail files where (due to size limitations and email retention agents) the Parent meeting has been deleted but the informational updates (the meeting emails with the “I” icon next to them) still exist.
Since the parent meeting is gone, the informational updates cannot be deleted. Many of them contain agenda items which can range from a few kb to several MB which takes up valuable space in the mail files.
you can write an agent to find the orphans and remove them. Here’s the logic
create a document collection or a view to act on the orphan items
SELECT Form = “Notice” & @IsAvailable($REF)
Now cycle through the docs and lookup the parent document. The parent relates to the UNID in the $Ref field. If not found then delete the orphan.
NOTE: If you use GetDocumentByUNID you will need to “catch” the error this method witll throw if the parent document is not found. I don’t think IBM has fixed this yet.
On Error 4091 Resume Next ’ need this to handle Invalid Universal ID error
ok, i tried the view formula and found one document with the ! next to it. I’m sure there should be more then that. If I check the ! document properties and find $REF field where is UID associated with parent doc?
I guess I’m not sure what I should be seeing.
Also, how do I delete the view? Cannot seem to remove it.
Dim ns As New NotesSession
Dim db As NotesDatabase
Dim ndc As NotesDocumentCollection
Dim rdoc As NotesDocument
Dim pdoc As NotesDocument
Dim tmpdoc As NotesDocument
Set db = ns.CurrentDatabase
sf$ = | SELECT Form = "Notice" & @IsAvailable($REF) |
Set ndc = db.Search(sf$, Nothing, 0)
If ndc.Count = 0 Then
Print "no response documents returned by search"
Exit Sub
End If
On Error 4091 Goto deldoc ' need this to handle Invalid Universal ID error
Set rdoc = ndc.GetFirstDocument
While Not rdoc Is Nothing
Set tmpdoc = ndc.GetNextDocument(rdoc)
Set pdoc = db.GetDocumentByUNID(rdoc.~$REF(0))