Lotus Notes FAQ Visit Our Sponsor!


How do you check if a document is a deletion stub?

When you write an agent that works on New or Modified Documents, the UnprocessedDocuments collection will sometimes return a deletion stub instead of only returning documents (this is probably a bug, but it's been around since R4). If you do not program for this case, your agent may suddenly stop working because it tried to access an item on a document that has been deleted.

You can check if a document is a deletion stub with this:
If (doc.Size = 0) then
'doc is a deletion stub
Else
'doc is not a deletion stub
End If

You can also use a comparision of:
If (doc.NoteID = "")


Applies to Notes Versions: 4 4.5 4.6 5
Last Modified: February 15, 2001
Home

*
Notes R3 *Notes R4 *Notes/Domino 4.5 *Notes/Domino 4.6 *Notes/Domino R5

*Notes/Domino 6 *Notes/Domino 6.5 *Notes/Domino 7 *Notes/Domino 8 *Notes/Domino 8.5