tags:

views:

150

answers:

2

I am able to access User Made Folder as:

 NotesView     folder        = _notesDatabase.GetView(folderName);
 NotesDocument folderDoc     = folder.GetFirstDocument();

But problem is that it can consist of "Mail","Calendar" and "To Do".

I am not able to differentiate them. Any ideas?

A: 

Hi,

The NotesView has a NotesView.IsFolder and NotesView.IsPrivate

IsPrivate- Read-only. Indicates whether an entry is specific to an individual.

Hope that helps. For more information goto http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp?topic=/com.ibm.help.domino.designer85.doc/DOC/H%5FWHAT%5FS%5FNEW%5FIN%5FRNEXT%5FCHAP.html

and search for NotesView

Josh

jj.matthews
+2  A: 

To differentiate by document type, you can generally use the "form" field value on a document. So, after you get the document handle (the NotesDocument object), use getItemValue to get the value of the form field. For example:

...
NotesDocument folderDoc = folder.getFirstDocument();
String sForm = folderDoc.getItemValue("form");
if (sForm == "Memo") {
 // Mail
}
if (sForm == "Appointment") {
 // Calendar entry
}
if (sForm == "Task") {
 // To Do
}
...
Ed Schembor