I am accessing Mail files from Lotus Notes.
For example "Inbox" but Inbox can again contain sub-folders.
So in order to differentiate i am comparing Parent Id of each folder.
I am accessing Mail files from Lotus Notes.
For example "Inbox" but Inbox can again contain sub-folders.
So in order to differentiate i am comparing Parent Id of each folder.
I'm on an old version of Lotus Notes, so I may be missing a piece of information here. In my version, there is no way for the Inbox to have a sub-folder like you might have in, say, Outlook.
However, you can have a hierarchy of folders for user-created folders. So for example, let's say I've filed some of my mail in a folder called "Departments". Then to be more specific, I've created a few folders within Departments called "HR", "Finance", and "IT". The folder names reflect the hierarchy I've created. The names of the folders (which are technically just NotesViews with a IsFolder = True) would be as follows:
Departments
Departments\HR
Departments\Finance
Departments\IT
You could easily parse the folder names to get the parent child relationship information you need, and then access the "parent" folder by name instead of an ID.
If you are simply trying to get a handle to the "parent" foler (when one exists), then you can get the current folder's name (using NotesView::Name property), and then split out all but the last component of that name to get the (potential) parent folder's name. Then, try using NotesDatabase::GetView to see if a folder by that parent name exists.
There is no actual folder hierarchy in Notes - folders are displayed nested based purely on the full name of the folder ( folder "A / B" is displayed nested under "A", but they have no true relationship within the Notes data store).
If you actually are looking for a unique ID to "differentiate" between folders, then you can use the NotesView::UniversalID attribute.