ケースリストコンポーネントのサンプルコード

  • リリースバージョン: Australia
  • 更新日 2026年03月12日
  • 所要時間:1分
  • イベントがトリガーされたときのアクションを定義するためのサンプルコードが用意されています。コンポーネントを Web ページに埋め込む前に、ユースケースのサンプルコードを更新します。

    サンプルコード

    { 
    
    'SN_EMBEDX_CASE_LIST#RECORD_SELECTED' : (e) => { 
    
    // This event is dispatched when a record is selected. 
    
    var {table, record_sys_id} = e.detail.payload; 
    
    // the logic to construct the URL for the Case View component. Add your portal URL here. 
    
    const caseViewURL = '/caseview?emb_table='+table+'&emb_recordid='+record_sys_id; 
    
    // Redirect to the Case view component page 
    
    open(caseViewURL,'_self'); 
    
    }, 
    
    'SN_EMBEDX_CASE_LIST#COMPONENT_READY' : (e) => { 
    
    // This event is dispatched when a component is ready and usable. 
    
    }, 
    
    'SN_EMBEDX_CASE_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); 
    
    }