在资源日历中访问会议的原始主题
我正在尝试设置一个系统,使用 Exchange 2007 和 EWS(Exchange Web 服务)在网页上显示资源日历中的日历项目。
我已设法访问资源的日历,但在获取日历中的项目时,每个日历项目的主题不是某人创建会议请求并邀请资源时使用的原始主题,而是用户名在创建会议请求的帐户上,例如。 如果我执行以下操作:
List<CalendarItemType> items =
Calendar.GetCalendarItems("[email protected]",
Calendar.GetNextWeekView(),
binding);
if (items.Count > 0)
{
Console.WriteLine(string.Format("Calendar opened - fetched {0} items",
items.Count));
Console.WriteLine("===================================");
foreach (var item in items)
{
Console.WriteLine();
Console.WriteLine(item.Subject);
Console.WriteLine("----------------------------------------");
Console.WriteLine("\tOrganizer: " + item.Organizer.Item.Name);
Console.WriteLine();
Console.WriteLine("\tStart: " + item.Start.ToString("dd-MM-yyyy HH:mm"));
Console.WriteLine("\tSlut: " + item.Start.ToString("dd-MM-yyyy HH:mm"));
}
}
其中 Calendar.GetCalendarItems 是一种获取第一个参数表示的资源的日历项目的方法,Calendar.GetNextWeekView() 是一个静态方法,它创建一个跨越今天日期下周的 CalendarView,并且绑定设置为使用具有资源邮箱委托访问权限的帐户。
如果使用管理员帐户预订资源,则 item.Subject
将显示为管理员。
有谁知道如何解决这个问题 - 我是否需要进行某种特殊的属性访问,或者获取其他类型的项目或什么?
问候 杰斯帕·豪格
I'm trying to set up a system that displays calendar items from a resource calendar on a web page using Exchange 2007 and EWS (Exchange Web Services).
I've managed to get access to the calendars of the resources, but when getting the items in the calendars, the subject of each calendar item is not the original subject used when someone created the meeting request and invited the resource, but rather the Username on the account that created the the meeting request eg. if I do something like:
List<CalendarItemType> items =
Calendar.GetCalendarItems("[email protected]",
Calendar.GetNextWeekView(),
binding);
if (items.Count > 0)
{
Console.WriteLine(string.Format("Calendar opened - fetched {0} items",
items.Count));
Console.WriteLine("===================================");
foreach (var item in items)
{
Console.WriteLine();
Console.WriteLine(item.Subject);
Console.WriteLine("----------------------------------------");
Console.WriteLine("\tOrganizer: " + item.Organizer.Item.Name);
Console.WriteLine();
Console.WriteLine("\tStart: " + item.Start.ToString("dd-MM-yyyy HH:mm"));
Console.WriteLine("\tSlut: " + item.Start.ToString("dd-MM-yyyy HH:mm"));
}
}
Where Calendar.GetCalendarItems, is a method that fetches the calendar items of the resource denoted by the first argument, the Calendar.GetNextWeekView() is a static method that creates a CalendarView spanning the next week from today's date, and the binding is set up to use an account with delegate access to the resource mailbox.
The item.Subject
comes out as Administrator if the Administrator account was used to book the resource.
Does anyone know how to remedy this - do I need to make some kind of special property access, or fetch another type of item or what?
Regards
Jesper Hauge
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我开始查看代码之外时,就弄清楚了这一点。
答案在于资源配置而不是访问代码。
如果你想让会议的主题反映原来的主题。 确保资源已将设置属性
DeleteSubject
和AddOrganizerToSubject
设置为 false。 可以使用以下 shell 命令来实现:问候
杰斯帕·豪格
Figured this one out - when I started looking outside the code.
Answer lies in resource configuration rather than access code.
If you want to have the subject of the meeting reflect the original subject. Make sure the resource has set the setting properties
DeleteSubject
andAddOrganizerToSubject
to false. It can be achieved with the following shell command:Regards
Jesper Hauge