---
sourceDocument: 호주 API 참조
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ko-KR/api-reference

 Release :

    - australia

ft:locale :

    - ko-KR

ft:publication_title :

    - 호주 API 참조

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# ScopedSessionDomain - 클라이언트

# ScopedSessionDomain - 클라이언트 {#ariaid-title1}

* 릴리스 버전: Australia
* 
* 업데이트 날짜 2026년 03월 12일
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 소요 시간: 3분

현재 세션 도메인과 관련된 기능을 제공하는 클라이언트 쪽 메서드가 포함된 ScopedSessionDomain 스크립트 포함입니다.

이 API는 인스턴스에서 Domain Support - Domain Extensions Installer 플러그인(com.glide.domain.msp_extensions) 플러그인이 활성화된 경우에만 사용할 수 있습니다. 또한 호출자에게 이 API에 액세스하려면 관리자 역할이 있어야 합니다.

## ScopedSessionDomain - getCurrentDomainID() {#ariaid-title2}

로그인한 사용자 세션에 대한 현재 도메인의 sys_id 반환합니다.
반환되는 식별자는 도메인 유형과 해당 도메인의 인스턴스화에 따라 다릅니다.

* 사용자가 전역 도메인에 구성되어 있고 도메인 선택기를 사용하여 도메인을 전환하지 않는 경우 메서드는 null을 반환합니다.
* 사용자가 도메인 선택기를 사용하여 전역 도메인으로 전환하는 경우 메서드는 문자열 "global"을 반환합니다.
* 다른 모든 도메인의 경우 메서드는 해당 도메인의 sys_id 반환합니다.  
클라이언트 측 스크립트에서 이 메서드에 액세스하려면 [GlideAjax()](https://servicenow-prod.fluidtopics.net/vHxvOtvlsftNLEMUY7rDow#c_GlideAjaxAPI "GlideAjax 클래스를 사용하면 클라이언트 스크립트가 스크립트 포함에서 서버 측 코드를 호출할 수 있습니다.") 를 사용하여 호출해야 합니다. 서버 측 스크립트에서 이 메서드를 호출하려면 다음과 유사한 것을 사용하여 객체를 인스턴스화하고 메서드에 액세스합니다.

    var ssg = new global.ScopedSessionDomain(); 
    domainID = ssg.getCurrentDomainID();

{#SSD-getCurrentDomainID__table_xrg_dfr_xnb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 1. 매개변수]

{#SSD-getCurrentDomainID__table_xrg_dfr_xnb} {#SSD-getCurrentDomainID__table_yrg_dfr_xnb__entry__2}

| 유형 | 설명 |
|-|-|
| 문자열 | 현재 로그인한 사용자의 세션 도메인 Sys_id입니다. 이는 도메인 선택기에 표시되는 정보와 동일합니다. |
[표 2. 반환]

{#SSD-getCurrentDomainID__table_yrg_dfr_xnb}  
이 예제는 클라이언트 측 스크립트에서 getCurrentDomainID() 메서드를 호출하는 방법을 보여줍니다.

    // This example is calling the script include in a client script. 
    // This particular record is within the "Service Portal - Standard Ticket" scope. 
    // To reproduce this example: 
    //  1. Change application scope to "Service Portal - Standard Ticket" 
    //  2. Navigate to Client Script table and open a new form and name it anything 
    //  3. Set table=ticket_configuration (this table is within the same scope) 
    //  4. Set UI type=Desktop and Type=onLoad 
    //  5. Populate the script field with the script above 
    //  6. Navigate to the ticket_configuration table and open any form. 
    //
    // This will trigger the client script, invoke the API, and pop up a browser alert containing the sys_id of the user's current domain

    function onLoad() {	
      var ga = new GlideAjax("global.ScopedSessionDomain"); // Set the script include
      ga.addParam("sysparm_name", "getCurrentDomainID"); // Set the getCurrentDomainID method
      ga.getXML(getResponse);
    	
      function getResponse(response) {
         var answer = response.responseXML.documentElement.getAttribute('answer');
         alert(answer); // Pops up the sys_id of the domain record
      }
    }


