FolderReferences property

Read only. Shows what folders have references to a particular document.

Note This property is new with Release 5.

Defined in

Data type
Array of strings

To get: StringArray = notesDocument.FolderReferences

Note The database must have the $FolderRef and $FolderRefInfo hidden views to support folder references. These views can be copied from the Release 5 mail template. Also, this property does not return view references.
Not all databases support folder references, so prior to getting the folder references for a document in the database, you should make sure that the database supports folder references by making a call to db.FolderReferencesEnabled.
For more information, see the FolderReferencesEnabled property in the NotesDatabase class.

The following script creates a new document in the database, puts it into "view1", "view2", and "view3" folders, then prints out all folder references and a count for each document.

Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Set db = session.CurrentDatabase
If(db.FolderReferencesEnabled) Then
  Messagebox ("Folder references enabled")
  Messagebox("Folder references are not enabled")
  Messagebox("Enabling folder references")
  db.FolderReferencesEnabled = True
End If
db.FolderReferencesEnabled = True
Set doc = db.CreateDocument
If Not(doc Is Nothing) Then
  Call doc.AppendItemValue("To", "Test Document Name")
  Call doc.AppendItemValue("Subject", "Test Document Topic")
  Call doc.Save(True, True)
  Messagebox ("Adding document to views")
  Call doc.Save(True, True)
End If
Dim doccoll As NotesDocumentCollection
Set doccoll = db.AllDocuments
Set doc = doccoll.GetFirstDocument
While Not(doc Is Nothing)
   i = 0
   Forall FolderReference In doc.FolderReferences
   i = i+1
   Print doc.noteid, "", i, "", FolderReferences
   End Forall
   Set doc = doccoll.GetNextDocument(doc)