#outlook-web-addins #outlook-web-app
#outlook-web-addins #outlook-веб-приложение
Вопрос:
Новая запись календаря Outlook. Установите повторяющийся (например, ежедневно в течение нескольких дней) и запустите надстройку Outlook.
Код надстройки Outlook:
const stLocal: Date = await GetOutlookTimeAsync(this.OutlookEvent.start);
const edLocal: Date = await GetOutlookTimeAsync(this.OutlookEvent.end);
const recurrence: Office.Recurrence = await GetOutlookStructureAsync("recurrence", this.OutlookEvent.recurrence);
..снип..
export const GetOutlookStructureAsync = (func: string, evt: any) => {
return new Promise<any>((resolve, reject) => {
const who: string = "GetOutlookStructure " func;
DebugLog(who, "Start");
evt.getAsync((asyncResult: Office.AsyncResult<any>) => {
if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
DebugLog(who, JSON.stringify(asyncResult.value));
resolve(asyncResult.value);
} else {
const errorText: string = asyncResult.error.message;
DebugLog(who, errorText);
reject(new Error(errorText));
}
});
});
};
Консоль браузера показывает:
Uncaught TypeError: Cannot read property 'startYear' of undefined
at e.importFromSeriesTimeJsonObject (outlook-web-16.01.js:19)
at Ta (outlook-web-16.01.js:19)
at (outlook-web-16.01.js:19)
at Object.a [as callback] (outlook-web-16.01.js:19)
at L (outlook-web-16.01.js:19)
Ответ №1:
В настоящее время эта ошибка отслеживается здесь:https://github.com/OfficeDev/office-js/issues/1312