Office.Sensitivity interface
予定の秘密度レベルを取得して設定するメソッドを提供します。 秘密度レベルの詳細については、「メールを標準、個人用、プライベート、または機密 としてマークする」を参照してください。
メソッド
| get |
予定の秘密度レベルを取得します。 |
| get |
予定の秘密度レベルを取得します。 |
| set |
予定の秘密度レベルを設定します。 |
| set |
予定の秘密度レベルを設定します。 |
メソッドの詳細
getAsync(options, callback)
予定の秘密度レベルを取得します。
getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<MailboxEnums.AppointmentSensitivityType>) => void): void;
パラメーター
- options
- Office.AsyncContextOptions
次のプロパティの 1 つ以上を含むオブジェクト リテラル:- asyncContext: 開発者は、コールバック関数でアクセスしたいオブジェクトを指定できます。
- callback
-
(asyncResult: Office.AsyncResult<Office.MailboxEnums.AppointmentSensitivityType>) => void
メソッドが完了すると、callback パラメーターで渡された関数が、Office.AsyncResult オブジェクトである 1 つのパラメーター asyncResult を指定して呼び出されます。 予定の秘密度レベルは asyncResult.value プロパティで返されます。
返品
void
注釈
最小アクセス許可レベル: 項目の読み取り
適用可能な Outlook モード: Compose
重要: Outlook on the web、新しい Outlook on Windows、Outlook on Mac は、標準およびプライベートの秘密度レベルのみをサポートしています。 これらのクライアントから機密または個人の秘密度レベルを持つ予定で getAsync に電話をかけると、 asyncResult.value プロパティで通常の秘密度レベルが返されます。
getAsync(callback)
予定の秘密度レベルを取得します。
getAsync(callback: (asyncResult: Office.AsyncResult<MailboxEnums.AppointmentSensitivityType>) => void): void;
パラメーター
- callback
-
(asyncResult: Office.AsyncResult<Office.MailboxEnums.AppointmentSensitivityType>) => void
メソッドが完了すると、callback パラメーターで渡された関数が、Office.AsyncResult オブジェクトである 1 つのパラメーター asyncResult を指定して呼び出されます。 予定の秘密度レベルは asyncResult.value プロパティで返されます。
返品
void
注釈
最小アクセス許可レベル: 項目の読み取り
適用可能な Outlook モード: Compose
重要: Outlook on the web、新しい Outlook on Windows、Outlook on Mac は、標準およびプライベートの秘密度レベルのみをサポートしています。 これらのクライアントから機密または個人の秘密度レベルを持つ予定で getAsync に電話をかけると、 asyncResult.value プロパティで通常の秘密度レベルが返されます。
例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-set-sensitivity-level.yaml
Office.context.mailbox.item.sensitivity.getAsync(function(asyncResult) {
if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
console.log("Sensitivity: " + asyncResult.value);
} else {
console.log("Failed to get sensitivity: " + JSON.stringify(asyncResult.error));
}
});
setAsync(sensitivity, options, callback)
予定の秘密度レベルを設定します。
setAsync(sensitivity: MailboxEnums.AppointmentSensitivityType | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
パラメーター
- sensitivity
秘密度レベル (列挙型または文字列形式)。
- options
- Office.AsyncContextOptions
次のプロパティの 1 つ以上を含むオブジェクト リテラル:- asyncContext: 開発者は、コールバック関数でアクセスしたいオブジェクトを指定できます。
- callback
-
(asyncResult: Office.AsyncResult<void>) => void
省略可能。 メソッドが完了すると、callback パラメーターで渡された関数が、Office.AsyncResult オブジェクトである 1 つのパラメーター asyncResult を指定して呼び出されます。
返品
void
注釈
最小アクセス許可レベル: 項目の読み取り/書き込み
適用可能な Outlook モード: Compose
重要: Outlook on the web、新しい Outlook on Windows、Outlook on Mac は、標準およびプライベートの秘密度レベルのみをサポートしています。
エラー:
-
Unsupported API parameter: 予定の秘密度レベルの設定はサポートされていません。
例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-set-sensitivity-level.yaml
Office.context.mailbox.item.sensitivity.setAsync(
Office.MailboxEnums.AppointmentSensitivityType.Private,
function callback(asyncResult) {
if (asyncResult.status === Office.AsyncResultStatus.Failed) {
console.log("Failed to set appointment sensitivity: " + JSON.stringify(asyncResult.error));
} else {
console.log("Successfully set appointment sensitivity.");
}
}
);
setAsync(sensitivity, callback)
予定の秘密度レベルを設定します。
setAsync(sensitivity: MailboxEnums.AppointmentSensitivityType | string, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
パラメーター
- sensitivity
秘密度レベル (列挙型または文字列形式)。
- callback
-
(asyncResult: Office.AsyncResult<void>) => void
省略可能。 メソッドが完了すると、callback パラメーターで渡された関数が、Office.AsyncResult オブジェクトである 1 つのパラメーター asyncResult を指定して呼び出されます。
返品
void
注釈
最小アクセス許可レベル: 項目の読み取り/書き込み
適用可能な Outlook モード: Compose
重要: Outlook on the web、新しい Outlook on Windows、Outlook on Mac は、標準およびプライベートの秘密度レベルのみをサポートしています。
エラー:
-
Unsupported API parameter: 予定の秘密度レベルの設定はサポートされていません。