---
sourceDocument: オーストラリア API リファレンス
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/api-reference

 Release :

    - australia

ft:locale :

    - ja-JP

ft:publication_title :

    - オーストラリア API リファレンス

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# 設定 - スコープ対象、グローバル

# 設定 - スコープ対象、グローバル {#ariaid-title1}

* リリースバージョン: Australia
* 
* 更新日 2026年03月12日
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 所要時間：3分

設定 API は、ユーザーの通知先を取得します。

通知先とは、特定のメールアドレスや電話番号など、通知を配信できる場所です。この API は、通知 \[sys_notification\] テーブルからの通知に基づいています。通知は、メールや ワークスペースなどのチャネルを介して送信されます。チャネルを使用して、複数のタイプの宛先に通知を送信できます。たとえば、メールチャネルは、個人用メールと仕事用メールの両方の宛先に通知を送信できます。宛先タイプは、通知宛先タイプ \[sys_notif_destination_type\] テーブルに一覧表示されます。

この API を [PreferenceDestination](https://servicenow-prod.fluidtopics.net/OYAMc4aloM4j2plZpFU4RQ#PreferenceDestinationBothAPI "PreferenceDestination API は、ユーザー通知設定を更新します。") API とともに使用して、ユーザー通知設定を更新します。

このクラスは、 `sn_notification` 名前空間識別子を使用します。

## 設定:設定 (GlideRecord 受信者) {#ariaid-title2}

指定されたユーザーの設定オブジェクトをインスタンス化します。
{#Preferences-Preferences_O__table_bkn_fx3_wnb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| 受信者 | GlideRecord | 通知先を取得するユーザーに対するユーザー \[sys_user\] テーブルからの GlideRecord 。 |
[表 : 1. パラメーター]

{#Preferences-Preferences_O__table_bkn_fx3_wnb}  
この例では、ユーザー Abel Tuter の Preferences オブジェクトをインスタンス化します。

    var recipient = new GlideRecord('sys_user'); 
    recipient.get('last_name', 'Tuter'); 
    var prefs = new sn_notification.Preferences(recipient);

## 設定:getDestinations() {#ariaid-title3}

ユーザーの通知先を返します。
{#Preferences-getDestinations__table_ept_hx3_wnb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 2. パラメーター]

{#Preferences-getDestinations__table_ept_hx3_wnb} {#Preferences-getDestinations__table_fpt_hx3_wnb__entry__2}

| タイプ | 説明 |
|-|-|
| アレイ | [PreferenceDestination](https://servicenow-prod.fluidtopics.net/OYAMc4aloM4j2plZpFU4RQ#PreferenceDestinationBothAPI "PreferenceDestination API は、ユーザー通知設定を更新します。") オブジェクトのアレイ。ユーザーに宛先がない場合、アレイは空です。 |
[表 : 3. 返される内容]

{#Preferences-getDestinations__table_fpt_hx3_wnb}  
この例では、Abel Tuter のすべての通知先を取得します。出力は、Abel の宛先が 1 つであることを示しています。

    var recipient = new GlideRecord('sys_user'); 
    recipient.get('last_name', 'Tuter'); 
    var prefs = new sn_notification.Preferences(recipient);
    var dests = prefs.getDestinations();
    gs.print(dests);

出力：

    [object PreferenceDestination]

## 設定:getDestinationsByChannel(GlideRecord channel) {#ariaid-title4}

指定されたチャネルを使用するユーザーの通知宛先を返します。
{#Preferences-getDestinationsByChannel_O__table_x4m_lx3_wnb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| チャネル | GlideRecord | フィルターを適用するチャネルの通知チャネル \[sys_notification_channel\] テーブルからの GlideRecord 。 |
[表 : 4. パラメーター]

{#Preferences-getDestinationsByChannel_O__table_x4m_lx3_wnb} {#Preferences-getDestinationsByChannel_O__table_y4m_lx3_wnb__entry__2}

| タイプ | 説明 |
|-|-|
| アレイ | [PreferenceDestination](https://servicenow-prod.fluidtopics.net/OYAMc4aloM4j2plZpFU4RQ#PreferenceDestinationBothAPI "PreferenceDestination API は、ユーザー通知設定を更新します。") オブジェクトのアレイ。ユーザーがチャネルを使用する通知先を持っていない場合、またはチャネルが存在しない場合、アレイは空です。 |
[表 : 5. 返される内容]

{#Preferences-getDestinationsByChannel_O__table_y4m_lx3_wnb}  
この例では、ワークスペースチャネルを使用するすべての Abel Tuter の宛先を取得します。出力は、Abel にワークスペースチャネルを使用する宛先が 1 つあることを示しています。

    var recipient = new GlideRecord('sys_user'); 
    recipient.get('last_name', 'Tuter'); 
    var prefs = new sn_notification.Preferences(recipient);
    var channel = new GlideRecord('sys_notification_channel');
    channel.get('name', 'Workspace'); 
    var dests = prefs.getDestinationsByChannel(channel);
    gs.print(dests);

出力：

    [object PreferenceDestination]


