Lotus Notes 中的重复日历条目
有人知道是否可以在一系列定期会议中更改其中一个文档? 我用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
来自“Lotus Notes 日历和日程安排解释!第 1 部分”:
以及来自“IBM Lotus Notes 和 Domino 日历和调度架构” :
因此,您基本上要做的就是找到事件的子文档($CSFlags 包含“i”和 $Ref 父级 UNID)并为更改的日期/时间创建一个新的(第二个)子文档,删除此特定日期/来自现有子文档 IIRC 的时间条目。
在这种情况下,我总是在 Notes 客户端中手动执行此操作,然后将以这种方式创建的字段与我通过代码创建的字段进行比较。
From "Lotus Notes Calendar and Scheduling explained! Part 1":
And from the "IBM Lotus Notes and Domino Calendaring & Scheduling Schema":
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.
在代码中,您循环浏览视图并更改视图中可用的所有文档。您需要选择要更改的文档。
编辑:
重复条目是在视图中多次显示的文档。因此,您可能会多次更新同一个文档。比较该系列中所有文档的 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.
我能给您的最好的建议,实际上也是唯一的建议是研究邮件模板中的 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.