为什么我在保存 outlook 邮件上下文后有时会在 eventId 中收到“/”?
Why i am i getting '/' sometimes in eventId after saving outlook mail context?
我正在保存 outlook 上下文,并在 saveAsync 方法中获取事件 ID。有时事件 ID 中包含“/”。如果我将那个 eventId 与“/”一起使用,它就会失败。有人可以帮我解决这个问题吗?
Office.context.mailbox.subject.setAsync
(
"subject",
function (asyncResult0)
{
if (asyncResult0.status === Office.AsyncResultStatus.Succeeded)
{
Office.context.mailbox.body.setAsync
(
"sample body",
function (asyncResult1)
{
if (asyncResult1.status === Office.AsyncResultStatus.Succeeded)
{
Office.context.mailbox.item.saveAsync
(
function (result)
{
**let eventId = result.value;**
// Process the result
}
);
}
}
);
}
}
);```
将您的代码更新为:
Office.context.mailbox.subject.setAsync -> Office.context.mailbox.item.subject.setAsync
Office.context.mailbox.body.setAsync -> Office.context.mailbox.item.body.setAsync
如果问题仍然存在,能否请您分享结果的屏幕截图和您尝试实现的场景。
我正在保存 outlook 上下文,并在 saveAsync 方法中获取事件 ID。有时事件 ID 中包含“/”。如果我将那个 eventId 与“/”一起使用,它就会失败。有人可以帮我解决这个问题吗?
Office.context.mailbox.subject.setAsync
(
"subject",
function (asyncResult0)
{
if (asyncResult0.status === Office.AsyncResultStatus.Succeeded)
{
Office.context.mailbox.body.setAsync
(
"sample body",
function (asyncResult1)
{
if (asyncResult1.status === Office.AsyncResultStatus.Succeeded)
{
Office.context.mailbox.item.saveAsync
(
function (result)
{
**let eventId = result.value;**
// Process the result
}
);
}
}
);
}
}
);```
将您的代码更新为:
Office.context.mailbox.subject.setAsync -> Office.context.mailbox.item.subject.setAsync
Office.context.mailbox.body.setAsync -> Office.context.mailbox.item.body.setAsync
如果问题仍然存在,能否请您分享结果的屏幕截图和您尝试实现的场景。