Office.Recurrence interface

オブジェクトは Recurrence 、予定の定期的なパターンを取得および設定するメソッドを提供しますが、会議出席依頼の定期的なパターンのみを取得します。 これには、および (省略可能) というseriesTimerecurrenceTyperecurrencePropertiesキーを持つディクショナリがあります。recurrenceTimeZone

注釈

[ API セット: メールボックス 1.7 ]

最小アクセス許可レベル: アイテムの読み取り

適用できる Outlook モード: 新規作成または読み取り

状態

状態コード 編集。 表示。
予定オーガナイザー - 新規作成シリーズ はい (setAsync) はい (getAsync)
予定オーガナイザー - Compose インスタンス いいえ (setAsync はエラーを返します) はい (getAsync)
予定出席者 - 読み取りシリーズ いいえ (setAsync は使用できません) はい (item.recurrence)
予定出席者 - 読み取りインスタンス いいえ (setAsync は使用できません) はい (item.recurrence)
会議出席依頼 - 読み取りシリーズ いいえ (setAsync は使用できません) はい (item.recurrence)
会議出席依頼 - インスタンスの読み取り いいえ (setAsync は使用できません) はい (item.recurrence)

プロパティ

recurrenceProperties

定期的な予定の系列のプロパティを取得または設定します。

recurrenceTimeZone

定期的な予定の系列のプロパティを取得または設定します。

recurrenceType

定期的な予定の系列の種類を取得または設定します。

seriesTime

SeriesTime オブジェクトを使用すると、定期的な予定シリーズの開始日と終了日、およびインスタンスの通常の開始時刻と終了時刻を管理できます。 このオブジェクトは UTC 時刻ではありません。 代わりに、値で指定されたタイム ゾーンに設定されるか、 recurrenceTimeZone アイテムのタイム ゾーンに既定値が設定されます。

メソッド

getAsync(options, callback)

予定の系列の現在の繰り返しオブジェクトを返します。

このメソッドは、予定の系列のオブジェクト全体 Recurrence を返します。

getAsync(callback)

予定の系列の現在の繰り返しオブジェクトを返します。

このメソッドは、予定の系列のオブジェクト全体 Recurrence を返します。

setAsync(recurrencePattern, options, callback)

予定の系列の繰り返しパターンを設定します。

: setAsync インスタンス項目ではなく、系列項目でのみ使用できます。

setAsync(recurrencePattern, callback)

予定の系列の繰り返しパターンを設定します。

: setAsync インスタンス項目ではなく、系列項目でのみ使用できます。

プロパティの詳細

recurrenceProperties

定期的な予定の系列のプロパティを取得または設定します。

recurrenceProperties?: RecurrenceProperties;

プロパティ値

注釈

[ API セット: メールボックス 1.7 ]

最小アクセス許可レベル: アイテムの読み取り

適用できる Outlook モード: 新規作成または読み取り

recurrenceTimeZone

定期的な予定の系列のプロパティを取得または設定します。

recurrenceTimeZone?: RecurrenceTimeZone;

プロパティ値

注釈

[ API セット: メールボックス 1.7 ]

最小アクセス許可レベル: アイテムの読み取り

適用できる Outlook モード: 新規作成または読み取り

recurrenceType

定期的な予定の系列の種類を取得または設定します。

recurrenceType: MailboxEnums.RecurrenceType | string;

プロパティ値

注釈

[ API セット: メールボックス 1.7 ]

最小アクセス許可レベル: アイテムの読み取り

適用できる Outlook モード: 新規作成または読み取り

seriesTime

SeriesTime オブジェクトを使用すると、定期的な予定シリーズの開始日と終了日、およびインスタンスの通常の開始時刻と終了時刻を管理できます。 このオブジェクトは UTC 時刻ではありません。 代わりに、値で指定されたタイム ゾーンに設定されるか、 recurrenceTimeZone アイテムのタイム ゾーンに既定値が設定されます。

seriesTime: SeriesTime;

プロパティ値

注釈

[ API セット: メールボックス 1.7 ]

最小アクセス許可レベル: アイテムの読み取り

適用できる Outlook モード: 新規作成または読み取り

メソッドの詳細

getAsync(options, callback)

予定の系列の現在の繰り返しオブジェクトを返します。

このメソッドは、予定の系列のオブジェクト全体 Recurrence を返します。

getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<Recurrence>) => void): void;

パラメーター

options
Office.AsyncContextOptions

次のプロパティの 1 つ以上を含むオブジェクト リテラル:- asyncContext: 開発者は、コールバック関数でアクセスする任意のオブジェクトを指定できます。

callback

(asyncResult: Office.AsyncResult<Office.Recurrence>) => void

オプション。 メソッドが完了すると、 パラメーターでcallback渡された関数が、 オブジェクトである 1 つのパラメーターasyncResultOffice.AsyncResultで呼び出されます。 value結果の プロパティは オブジェクトですRecurrence

戻り値

void

注釈

[ API セット: メールボックス 1.7 ]

最小アクセス許可レベル: アイテムの読み取り

適用できる Outlook モード: 新規作成または読み取り

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/50-recurrence/get-set-recurrence-appointment-organizer.yaml

Office.context.mailbox.item.recurrence.getAsync(function(asyncResult) {
  if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
    const recurrence = asyncResult.value;
    if (recurrence === null) {
      console.log("This is a single appointment.");
    } else {
      console.log(`Recurrence pattern: ${JSON.stringify(recurrence)}`);
    }
  } else {
    console.error(asyncResult.error);
  }
});

getAsync(callback)

予定の系列の現在の繰り返しオブジェクトを返します。

このメソッドは、予定の系列のオブジェクト全体 Recurrence を返します。

getAsync(callback?: (asyncResult: Office.AsyncResult<Recurrence>) => void): void;

パラメーター

callback

(asyncResult: Office.AsyncResult<Office.Recurrence>) => void

オプション。 メソッドが完了すると、 パラメーターでcallback渡された関数が、 オブジェクトである 1 つのパラメーターasyncResultOffice.AsyncResultで呼び出されます。 value結果の プロパティは オブジェクトですRecurrence

戻り値

void

注釈

[ API セット: メールボックス 1.7 ]

最小アクセス許可レベル: アイテムの読み取り

適用できる Outlook モード: 新規作成または読み取り

setAsync(recurrencePattern, options, callback)

予定の系列の繰り返しパターンを設定します。

: setAsync インスタンス項目ではなく、系列項目でのみ使用できます。

setAsync(recurrencePattern: Recurrence, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;

パラメーター

recurrencePattern
Office.Recurrence

繰り返しオブジェクト。

options
Office.AsyncContextOptions

次のプロパティの 1 つ以上を含むオブジェクト リテラル:- asyncContext: 開発者は、コールバック関数でアクセスする任意のオブジェクトを指定できます。

callback

(asyncResult: Office.AsyncResult<void>) => void

オプション。 メソッドが完了すると、 パラメーターでcallback渡された関数が、 オブジェクトである 1 つのパラメーターasyncResultOffice.AsyncResultで呼び出されます。

戻り値

void

注釈

[ API セット: メールボックス 1.7 ]

最小アクセス許可レベル: 項目の読み取り/書き込み

適用できる Outlook モード: 新規作成

エラー:

  • InvalidEndTime: 予定の終了時刻は開始時刻より前です。

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/50-recurrence/get-set-recurrence-appointment-organizer.yaml

// Important: Can only set the recurrence pattern of an appointment series.

const currentDate = new Date();
let seriesTimeObject: Office.SeriesTime;
// Set series start date to tomorrow.
seriesTimeObject.setStartDate(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDay() + 1);
// Set series end date to one year from now.
seriesTimeObject.setEndDate(currentDate.getFullYear() + 1, currentDate.getMonth() + 1, currentDate.getDay());
// Set start time to 1:30 PM.
seriesTimeObject.setStartTime(13, 30);
// Set duration to 30 minutes.
seriesTimeObject.setDuration(30);

const pattern: Office.Recurrence = {
  seriesTime: seriesTimeObject,
  recurrenceType: Office.MailboxEnums.RecurrenceType.Yearly,
  recurrenceProperties: {
    interval: 1,
    dayOfWeek: Office.MailboxEnums.Days.Tue,
    weekNumber: Office.MailboxEnums.WeekNumber.Second,
    month: Office.MailboxEnums.Month.Sep
  },
  recurrenceTimeZone: { name: Office.MailboxEnums.RecurrenceTimeZone.PacificStandardTime }
};

Office.context.mailbox.item.recurrence.setAsync(pattern, (asyncResult) => {
  if (asyncResult.status !== Office.AsyncResultStatus.Succeeded) {
    console.error(`Failed to set recurrence. Error: ${asyncResult.error.message}`);
    return;
  }
  console.log(`Succeeded in setting recurrence pattern ${JSON.stringify(pattern)}`);
});

setAsync(recurrencePattern, callback)

予定の系列の繰り返しパターンを設定します。

: setAsync インスタンス項目ではなく、系列項目でのみ使用できます。

setAsync(recurrencePattern: Recurrence, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;

パラメーター

recurrencePattern
Office.Recurrence

繰り返しオブジェクト。

callback

(asyncResult: Office.AsyncResult<void>) => void

オプション。 メソッドが完了すると、 パラメーターでcallback渡された関数が、 オブジェクトである 1 つのパラメーターasyncResultOffice.AsyncResultで呼び出されます。

戻り値

void

注釈

[ API セット: メールボックス 1.7 ]

最小アクセス許可レベル: 項目の読み取り/書き込み

適用できる Outlook モード: 新規作成

エラー:

  • InvalidEndTime: 予定の終了時刻は開始時刻より前です。