---
sourceDocument: オーストラリアのカスタマーサービス管理 (CSM)
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/customer-service-management

 Release :

    - australia

ft:locale :

    - ja-JP

ft:publication_title :

    - オーストラリアのカスタマーサービス管理 (CSM)

ft:clusterId :

    - csm

bundleId :

    - csm

workflow :

    - Customer and Industry


---

# オブジェクトリストコンポーネントのサンプルコード

# オブジェクトリストコンポーネントのサンプルコード {#ariaid-title1}

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

イベントがトリガーされたときのアクションを定義するためのサンプルコードが用意されています。コンポーネントを Web ページに埋め込む前に、ユースケースのサンプルコードを更新します。

## サンプルコード {#we-object-list-sample-code__section_cnx_hdt_zfc}

    { 

    'SN_EMBEDX_OBJECT_LIST#FOOTER_LINK_SELECTED' : (e) => { 

    // This event is dispatched when footer link is selected 

    var {table, view, edit_query, nest_by} = e.detail.payload; 

    const objectListURL = '/objectlist?emb_table=' + table + '&emb_query=' + edit_query + '&emb_view=' + view + '&emb_nestby=' + nest_by; 

    // Open the Record List component in the same tab 

    open(objectListURL, '_self'); 

    }, 

    'SN_EMBEDX_OBJECT_LIST#COMPONENT_ERROR' : (e) => { 

    // This event is dispatched when a property validation or internal error occurs. 

    var {errorMessage, errorType} = e.detail.payload; 

    console.log(errorMessage, errorType); 

    }, 

    'SN_EMBEDX_OBJECT_LIST#RECORD_SELECTED' : (e) => { 

    // This event is dispatched when a record is selected. 

    var {table, record_sys_id} = e.detail.payload; 

     

    var RecordViewURL; 

    if(table == 'sn_customerservice_case'){ 

    RecordViewURL = '/caseview?emb_table=' + table + '&emb_recordid=' + record_sys_id; 

    } else { 

    RecordViewURL = '/recordview?emb_table=' + table + '&emb_recordid=' + record_sys_id; 

    } 

    open(RecordViewURL, '_self'); 

    }, 

    'SN_EMBEDX_OBJECT_LIST#COMPONENT_READY' : (e) => { 

    // This event is dispatched when a component is ready and usable. 

    } 


