Lotus Notes 中的重复日历条目

发布于 2024-12-11 08:04:56 字数 594 浏览 0 评论 0原文

有人知道是否可以在一系列定期会议中更改其中一个文档? 我用 c# api 更改了其中一个,它更改了该系列中的所有文档(例如,系列中的 5 个文档将在一次 save() 调用期间修改)

var document = view.GetFirstDocument();
if (document != null)
{
    do
    {
        var item = document.GetFirstItem("Repeats");
        var repeat = tmpItem != null ? Convert.ToInt32(tmpItem.Text) : 0;

        if(repeats)
        {
            document.ReplaceItemValue("myVal", "1"); //it change all my 5 docs after first save
            document.Save(true, false);
        }
        document = view.GetNextDocument(document);
    }
    while (document != null);
}

Does somebody know if it is possible to change one of documents in a series of recurring meetings?
I changed one of them with c# api and it changed all documents in the series (e.g. 5 docs in series will be modified during one save() call)

var document = view.GetFirstDocument();
if (document != null)
{
    do
    {
        var item = document.GetFirstItem("Repeats");
        var repeat = tmpItem != null ? Convert.ToInt32(tmpItem.Text) : 0;

        if(repeats)
        {
            document.ReplaceItemValue("myVal", "1"); //it change all my 5 docs after first save
            document.Save(true, false);
        }
        document = view.GetNextDocument(document);
    }
    while (document != null);
}

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

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

发布评论

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

评论(3

挖鼻大婶 2024-12-18 08:04:56

来自“Lotus Notes 日历和日程安排解释!第 1 部分”:

如果主席重新安排了某些实例,则重复会议的实例文档可以拆分为多个文档。考虑一次每周重复一次、持续五周的重复会议。如果主席将第一个和第二个实例提前一个小时,则所有五个实例的单个响应文档现在将分为两个响应文档:一个用于第一个和第二个实例,另一个用于其余实例。

以及来自“IBM Lotus Notes 和 Domino 日历和调度架构” :

随着时间的推移,重复事件会被安排多次,并由父子关系中的至少两个注释表示。父注释由其 ApptUNID 项(即其注释通用 ID)标识,子注释由与父注释和原始 RepeatInstanceDates 相同的 ApptUNID 标识。 ApptUNID 和 RepeatInstanceDates 项形成唯一标识特定重复实例的键值对。本文的重复模型部分介绍了更多详细信息。

因此,您基本上要做的就是找到事件的子文档($CSFlags 包含“i”和 $Ref 父级 UNID)并为更改的日期/时间创建一个新的(第二个)子文档,删除此特定日期/来自现有子文档 IIRC 的时间条目。
在这种情况下,我总是在 Notes 客户端中手动执行此操作,然后将以这种方式创建的字段与我通过代码创建的字段进行比较。

From "Lotus Notes Calendar and Scheduling explained! Part 1":

the instance document of a repeating meeting can be split into multiple documents if the chair reschedules some instances. Consider a repeating meeting that repeats once a week for five weeks. If the chair advances the first and second instance by an hour, the single response document for all five instances is now split into two response documents: one for the first and the second instance and another for the remaining instances.

And from the "IBM Lotus Notes and Domino Calendaring & Scheduling Schema":

Repeating events are scheduled more than once over time and are represented by at least two notes in a parent-child relationship. The parent note is identified by its ApptUNID item (which is its note universal ID), and the child note is identified by the same ApptUNID as the parent and the original RepeatInstanceDates. The ApptUNID and RepeatInstanceDates items form a key pair of values that uniquely identify a particular repeat instance. More details are covered in the Repeat Model section of this paper.

So what you basically have to do is find the child Document of the event ($CSFlags conatins "i" and $Ref the parents UNID) and create a new (second) child document for the changed date/time, removing this particular date/time entry from the existing child document, IIRC.
In such cases, I always do that manually in the Notes Client and then compare the fields created that way with the ones I created via my code.

紙鸢 2024-12-18 08:04:56

在代码中,您循环浏览视图并更改视图中可用的所有文档。您需要选择要更改的文档。

编辑:
重复条目是在视图中多次显示的文档。因此,您可能会多次更新同一个文档。比较该系列中所有文档的 UniversalID 即可确定。

如果您使用 Lotus 客户端更改其中一个条目,它会询问您是否要更新所有条目,如果您选择“仅此实例”,则该条目将保存在新文档中。因此,重复条目可以是单个文档或文档的组合。

In the code you loop through the view and change all documents that are available in the view. You need to pick the document you want to change.

EDIT:
A repeating entry is a document shown multiple times in a view. So it is possible that you are updating the same document multiple times. Compare the UniversalID of all the documents in the series to be sure.

If you change one of the entries using the Lotus Client it will ask if you want to update all, if you select "just this instance" the entry will be saved in a new document. So a repeating entry can be a single document or a combination of documents.

满身野味 2024-12-18 08:04:56

我能给您的最好的建议,实际上也是唯一的建议是研究邮件模板中的 LotusScript 代码,并准确了解当用户更改重复约会中的一个条目时它会做什么。 Lotus没有以任何其他方式对其进行记录,但模板代码全部开源,并且具有最终权威。您的任务是与他们在模板中所做的事情兼容 - 否则您的代码很可能会产生副作用,从而给尝试使用 Notes 客户端在日历事件系列上执行其他操作的用户带来问题。你的代码已经运行了。

The best advice, and really the only advice, that I can give you is to study the LotusScript code in the mail template, and see exactly what it does when a user changes one entry in a repeating appointment. Lotus has not documented it in any other way, but the template code is all open source and it is the ultimate authority. Your task is to be compatible with what they do in the template -- otherwise it is pretty likely that your code will have side-effects that cause problems for users who try to use the Notes client to take additional actions on the calendar event series after your code has run.

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