如何使用 .NET 获取 Lotus Notes 文件夹的父 ID?

发布于 2024-08-04 03:19:32 字数 94 浏览 3 评论 0原文

我正在从 Lotus Notes 访问邮件文件。

例如“收件箱”,但收件箱可以再次包含子文件夹。

因此,为了区分,我比较每个文件夹的父 ID。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

眼眸里的那抹悲凉 2024-08-11 03:19:32

我使用的是旧版本的 Lotus Notes,因此我可能会在这里遗漏一些信息。在我的版本中,收件箱无法像 Outlook 那样拥有子文件夹。

但是,您可以为用户创建的文件夹设置文件夹层次结构。例如,假设我已将一些邮件归档到名为“部门”的文件夹中。更具体地说,我在部门内创建了几个名为“HR”、“Finance”和“IT”的文件夹。文件夹名称反映了我创建的层次结构。文件夹的名称(技术上只是 IsFolder = True 的 NotesViews)如下:

Departments
Departments\HR
Departments\Finance
Departments\IT

您可以轻松解析文件夹名称以获取所需的父子关系信息,然后按名称访问“父”文件夹一个ID。

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.

晒暮凉 2024-08-11 03:19:32

如果您只是想获取“父”文件夹的句柄(如果存在),那么您可以获取当前文件夹的名称(使用 NotesView::Name 属性),然后拆分除该名称的最后一个组件之外的所有组件获取(潜在的)父文件夹的名称。然后,尝试使用 NotesDatabase::GetView 来查看是否存在具有该父名称的文件夹。

Notes 中没有实际的文件夹层次结构 - 文件夹纯粹根据文件夹的全名嵌套显示(文件夹“A / B”显示为嵌套在“A”下,但它们在 Notes 数据存储中没有真正的关系)。

如果您确实正在寻找唯一的 ID 来“区分”文件夹,那么您可以使用 NotesView::UniversalID 属性。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文