Attempting to locate the parent folder/view of a given instance of the NotesDocument class within a C# application using the Domino interop.
The goal is to use the AllDocuments property on the NotesDatabase and then ignore any documents which have been discarded by the user. It appears the AllDocuments view returns documents which were deleted out of the $Trash and thus remain within the database as a point of reference; I want to ignore those documents. In addition ParentView and ParentDocumentUNID are both null.
When you say “deleted out of the
$Trash” do you refer to soft-deleted documents that appear in the$Trashor hard-deleted documents that have left deletion stubs?Assuming that through the interop you have access to the mentioned properties:
For soft-deleted documents, FolderReferences might help. However it requires the database to have the $FolderInfo and $FolderRefInfo hidden views.
Hard deleted documents (deletion stubs) should only appear in the
AllDocumentsNotesDocumentCollection if they were deleted after you obtained the collection. In this case IsDeleted NotesDocument property might help.ParentDocumentUNIDreturns empty string for documents that are not responses, it has nothing to do with deletion though.ParentViewreturns the view the document was retrieved from, in this caseNothing, because the document was not retrieved from a view.