events - Outlook 添加(日历事件):重复始终为空
问题描述
我有一个用于日历事件的 Outlook 插件,带有一个任务窗格。从窗格中,我得到事件数据:
date start: item.start.getAsync()
date end: item.end.getAsync()
recurrence: item.recurrence.getAsync()
日期还可以,但重复始终为空(状态 = '成功'),尽管我在事件中更改了重复...
可能是什么问题?
我正在使用开发 Outlook 365 Web
谢谢,
迭戈
编辑: 我在重复发生更改时收到事件:
Office.context.mailbox.item.addHandlerAsync(Office.EventType.RecurrenceChanged, handleRecurrenceChanged);
但是在 handleRecurrenceChanged() 中,重复总是为空... *
解决方案
使用您在评论中给我的代码,我会在它更改时得到重复:
Office.context.mailbox.item.addHandlerAsync(Office.EventType.RecurrenceChanged, handler, callback);
但只有“处理程序”函数被调用,其中重复有效:console.log(JSON.stringify(eventarg.recurrence));
- 为什么不调用回调函数?
- 为什么我的函数无法重现:
Office.context.mailbox.item.addHandlerAsync(Office.EventType.RecurrenceChanged, handleRecurrenceChange);
在这种情况下,handleRecurrenceChange 被调用但是当我调用 item.recurrence.getAsync() 我得到 result.value = null
如果我在需要重复时调用 item.recurrence.getAsync() 也是一样的(我得到空值)
我想在需要时获得重复(我可以正确获取所有其他事件值),如果可能的话,在更改时不保存它......
问候,
迭戈
推荐阅读
- python-3.x - 从相同颜色的背景中分离出前景对象
- clojure - 如何用 babashka 过滤尾部的输出
- django - 字段 'card_exp_month' 需要一个数字,但得到 (4,) - 添加到模型时的 Django 和条带 API
- node.js - MERN mongoDB 集合未更新且未发送响应
- android - 添加一个新的 CheckBox 和一个 editText 视图,当用户在 android 的键盘上点击 Done 时?
- jquery - 我的 AJAX 调用工作正常,但成功功能不起作用
- django - Django - PUT 端点验证器错误“wrapped_view() 缺少 1 个必需的位置参数:'request'”
- php - 尝试使用 PHP 脚本将值从 HTML 表单发送到电子邮件,使用代码时收到错误 405
- laravel - 如何修改关系?
- java - 使用 Blogger API 添加帖子不起作用