如何阅读SharePoint托管应用程序中的重复事件 [英] How to read recurring events in SharePoint hosted app

查看:90
本文介绍了如何阅读SharePoint托管应用程序中的重复事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何从SharePoint托管应用获取SharePoint日历的定期事件。有一个选项可以正常使用

SPServices
。但问题是我们无法在SharePoint托管的应用程序中使用SPServices。我坚持以下几点:

I would like to know how to get the recurring events for SharePoint calendar from SharePoint hosted app. There is an option to get normally using SPServices. But problem is we cannot use SPServices in SharePoint hosted app. I am stucking at below points:

1。对于周日,周日等指定工作日每2或3周重复的每周活动。

1. For weekly events which are recurring for every 2 or 3 weeks on specified weekdays like Sunday, monday etc.

2。在上面的场景中,如何根据开始事件日期计算每2或3周的日期。

2. In above scenario how to calculate every 2 or 3 weeks dates based on starting event date.

我用来获取如下的重复数据。它给了我xml字符串。基于我计划进行计算。我能够成功填充每日重复活动的数据。但每周它是有问题的。每月我尚未开始。

I am using to get the recurrence data as following. It is giving me in xml string. based on that I am planning do calculations. I am able to successfully populate data for daily recurring events. But weekly it is problematic. monthly i haven't started yet.

appWebUrl +"/_api/SP.AppContextSite(@target)/Web/Lists/getByTitle('" + listTitle + "')/items(" + itemId + ")/RecurrenceData?@target='" + hostWebUrl + "'",

我的数据如下所示

<recurrence><rule><firstDayOfWeek>su</firstDayOfWeek><repeat><weekly su="TRUE" mo="TRUE" tu="TRUE" we="TRUE" weekFrequency="1" /></repeat><repeatInstances>10</repeatInstances></rule></recurrence>


现在如何根据上面的xml字符串提取日期?

Now how to extract the dates based on above xml string?

Mihir

推荐答案

目前,没有简单的方法来扩展基于事件重复事件的实际日期, 在周期性事件数据中,它只使用布尔值指定工作日,我们无法根据此计算日期。

Currently, there is no easy way to expand real dates based event recurring events,  in recurring events data, it only specify the weekday with a boolean value and we can't calculate the date based on this.

以下是一些用户语音:

为重复发生的日历事件提供CSOM和REST API

在REST API中添加对重复事件的支持

唯一的解决方法是使用vti_bin / Lists.asmx,查看此博客:

The only workaround is to use vti_bin/Lists.asmx, check this blog:

CSOM在SharePoint 2013中获取日历重复事件

谢谢

最好的问候


这篇关于如何阅读SharePoint托管应用程序中的重复事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆