Delete document based on Note ID

There is a document in my Resource Reservations that causes a warning message in the notes log (SchedMgr cannot process calendar profile). The document, I suspect, is a deleted room resource (the room has been utilized for another purpose). I can do the find note id from the admin client and it shows up. Of course, there is no facility for deleting the document, just verifying that it exists. Anyone have a way I can remove this “invisible” document? Appreciation given in advance!

Mike

Subject: Delete document based on Note ID

You can write code to find it, or just look at the value of relevant fields as they show up in the Find Note tool. Look at Form and Type, and then based on what type of doc it is, look for fields that show up in views so you know what to delete.

Subject: Delete document based on Note ID

Many thanks for the responses! I will see if these work for me.

Mike

Subject: Delete document based on Note ID

Would this work?

Look at the Examples: Locating a document by ID; get a handle to the document and then delete it.

Subject: This might help, too!

'****deletes all Orphaned response documents

Dim session As New NotesSession

 Dim database As New _

 NotesDatabase ("",session.CurrentDatabase.FileName)

 Dim doc As NotesDocument

 Dim collection As NotesDocumentCollection

 Dim dt As Variant

 Dim counter As Integer





 Set collection = database.AllDocuments

 For x = 1 To collection.count

      Set doc = collection.GetNthDocument(x)

      If doc.Isresponse = True Then



           Set parentdoc = database.GetDocumentByUNID _

           (doc.ParentDocumentUNID)



           On Error Resume Next

           If (ParentDoc.Responses Is Nothing) Then

                Call doc.remove (True)

                Counter = Counter + 1

           End If

      End If

 Next x

 Messagebox (Str(Counter) & " Documents were deleted")

Subject: Go check the TechNotes dB

There was a known problem we eventually fixed where some paths thru the template could cause “runt” Calendar Profile docs to be created (just 1 actually). Once this runt is there it was there forever and it would cause SchedMgr to log a msg to the console when certain actions caused it to be found.

Even though the template got fixed, the runt exists. We created TN 1086086 about this and provided an Agent to go remove the runts from the dB. Go get it and see if that helps you out.

Bruce

IBM