---
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


---

# GlideModal (넥스트 경험) - 클라이언트

# GlideModal (넥스트 경험) - 클라이언트 {#ariaid-title1}

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

GlideModal API는 모달이라고 하는 컨텐츠 오버레이를 표시하는 메서드를 제공합니다. 모달은 페이지 위에 나타나고 사용자가 작업을 수행하면 닫히는 대화형 창입니다. 모달을 사용하여 정보를 표시하거나, 질문을 하거나, 작업을 수행할 수 있습니다.

클라이언트 측 JavaScript를 사용할 수 있는 모든 위치의 스크립트에서 GlideModal 메서드를 사용합니다. 이러한 메서드는 클라이언트 확인란이 선택된 UI 작업에서 가장 자주 호출됩니다.  
모달에는 다음과 같은 다양한 유형의 컨텐츠가 포함될 수 있습니다.

* 정적 텍스트
* 동적 텍스트
* 양식
* 이미지
* 단추  
이 API를 사용하여 다음을 수행할 수 있습니다.

* 기존 모달을 가져옵니다.
* UI 페이지 또는 전달된 HTML에서 모달 컨텐츠를 작성합니다.
* 모달에서 제목을 설정합니다.
* 모달의 너비를 설정합니다.
* 기본 설정을 가져오고 설정합니다.
* 모달 뷰를 전환합니다.  
UI에 모달을 표시하려면 다음 render 메서드 중 하나를 호출해야 합니다.

* [GlideModal(넥스트 경험) - 렌더링()](https://servicenow-prod.fluidtopics.net/FZsWbo7SHRwS6QLjC8WFmQ#GModNX-render "모달에서 API가 인스턴스화될 때 지정된 UI 페이지를 렌더링합니다. UI에 표시할 모달을 정의한 후 이 메서드를 호출해야 합니다.")
* [GlideModal(넥스트 경험) - renderWithContent(String html)](https://servicenow-prod.fluidtopics.net/FZsWbo7SHRwS6QLjC8WFmQ#GModNX-renderWithContent_S "지정된 문자열 기반 HTML 컨텐츠로 모달을 표시합니다.")
{#GModClientAPINX__ul_n2g_g3d_kcc}  
다음 코드 예제에서는 UI 페이지 "UI_dialog_name"를 사용하여 모달을 만들고 렌더링하는 방법을 보여 줍니다.

    var dialog = new nowapi.GlideModal("UI_dialog_name");

    //Set the dialog title
    dialog.setTitle('Show title');

    //Set the dialog width		      	
    dialog.setWidth(550);

    //Display the modal
    dialog.render();

## GlideModal(넥스트 경험) - GlideModal(문자열 ID, 부울 읽기 전용, 숫자/문자열 너비) {#ariaid-title2}

GlideModal 클래스의 인스턴스를 만듭니다.
{#GModNX-GlideModal_S_B_N__table_ups_b4s_3v__entry__3}{#GModNX-GlideModal_S_B_N__GMod-GMod-id-entry}{#GModNX-GlideModal_S_B_N__GMod-GMod-readOnly-entry}{#GModNX-GlideModal_S_B_N__GMod-GMod-width-entry}

| 이름 | 유형 | 설명 |
|-|-|-|
| ID | 문자열 | 모달에 로드할[UI 페이지](https://servicenow-prod.fluidtopics.net/nJLHJtY8ImMRu0r2EOZ5OA#r_UIPages "UI 페이지를 사용하여 양식, 대화 상자, 목록 및 기타 UI 구성요소를 만들고 표시할 수 있습니다.") 의 이름입니다. 기본 시스템에 제공되는 `glide_modal_confirm` 또는 `glide_modal_info` 모달을 지정할 수도 있습니다. 테이블: UI 페이지 \[sys_ui_page\] |
| readOnly | 부울 | 옵션입니다. 모달의 콘텐츠가 읽기 전용인지 여부를 나타내는 플래그입니다. 유효한 값은 다음과 같습니다. * true: 컨텐츠가 읽기 전용입니다. * 아니오: 사용자가 컨텐츠를 수정할 수 있습니다. {#GModNX-GlideModal_S_B_N__ul_es3_yfv_lfc} 기본값: false |
| width | 숫자 또는 문자열 | 옵션입니다. 모달의 너비(픽셀 단위) 또는 모달 CSS 클래스입니다. 픽셀 너비가 전달되면 지정된 너비를 해당 CSS 클래스와 정렬합니다. 가능한 모달 CSS 클래스: * modal-alert: (300 px) 지정된 너비가 0에서 349 픽셀일 때 할당됩니다. * modal-sm: (400px) 지정된 너비가 350에서 449픽셀일 때 할당됩니다. * modal-md: (600px) 지정된 너비가 450에서 649픽셀일 때 할당됩니다. * modal-lg: (900 px) 지정된 너비가 650에서 900픽셀일 때 할당됩니다. {#GModNX-GlideModal_S_B_N__ul_gs3_yfv_lfc} 기본값: modal-md 최대 너비: 900픽셀 주: setWidth() 메서드를 사용하여 모달 너비를 설정할 수도 있습니다. |
[표 1. 매개변수]

{#GModNX-GlideModal_S_B_N__table_ups_b4s_3v}  
다음 코드 예제에서는 기존 UI 페이지를 사용하여 GlideModal 개체를 만드는 방법을 보여 줍니다.

    var dialog = new nowapi.GlideModal('UI_dialog_name');

    //Set the dialog title
    dialog.setTitle('Show title'); 

    //Set the desired preferences
    dialog.setPreference('table', 'task'); 			
    dialog.setPreference('name', 'value');        	

    //Opens the dialog
    dialog.render();

다음 코드 예제에서는 `glide_modal_confirm` 파일을 사용하여 GlideModal 개체를 만드는 방법을 보여 줍니다.

    var dialog = new nowapi.GlideModal('glide_modal_confirm', true, 300);
    dialog.setTitle(new GwtMessage().getMessage('Confirmation'));
    dialog.setPreference('body', new GwtMessage().format("This will complete all update sets in the batch. Continue changing state to complete?"));
    dialog.setPreference('focusTrap', true);
    dialog.setPreference('onPromptComplete', doComplete);
    dialog.setPreference('onPromptCancel', doCancel);
    dialog.render();
    	
    function doComplete() {
      callback(true);
    }
    	
    function doCancel() {
      callback(false);
    }

## GlideModal (넥스트 경험) - 삭제 () {#ariaid-title3}

현재 모달을 닫습니다.
{#GModNX-destroy__table_vhs_dpt_bdc__entry__3}

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

{#GModNX-destroy__table_vhs_dpt_bdc} {#GModNX-destroy__table_whs_dpt_bdc__entry__2}

| 유형 | 설명 |
|-|-|
| 없음 |   |
[표 3. 반환]

{#GModNX-destroy__table_whs_dpt_bdc}  
다음 코드 예제는 destroy() 메서드를 사용하여 모달을 닫는 방법을 보여줍니다.

    function cancelDialog(){

      var dialog = new nowapi.GlideModal('cancelTask');

      // Sets the dialog title
      dialog.setTitle('Cancel Task');

      // Set up valid custom HTML to display
      dialog.renderWithContent('<div style="padding:15px">
        <p>What action do you want to take?</p>
        <p><select name="cancellation" id="taskCancellation" class="form-control">
        <option value="cancelOnly" role="option">Cancel task but keep requested item open
        </option>
        <option value="cancelAll" role="option">Cancel this and all other tasks, closing the
        requested item</option></select></p><div style="padding:5px;float:right"><button      style="padding:5px;margin-right:10px onclick="window.changeTaskAction(this.innerHTML,     jQuery(\'#taskCancellation\').val())" class="btn btn-default">Abort</button>
        <button style="padding:5px" class="btn btn-primary"      onclick="window.changeTaskAction(this.innerHTML,jQuery(\'#taskCancellation\').val())">
        Cancel Task</button></div></div>');

      // Use the windows object to ensure the code is accessible from the modal dialog
      window.changeTaskAction = function(thisButton, thisAction){

        // Close the GlideModal dialog window
        dialog.destroy();

        // Submit to the back-end
        if(thisButton=='Cancel Task'){
          if(thisAction=="cancelAll"){
            // Closed Incomplete -- will close the Requested Item and all other open tasks
            g_form.setValue('state',4);
          }else{
            // Closed Skipped -- will only close this task
            g_form.setValue('state',7);
          }
             //Regular ServiceNow form submission
             gsftSubmit(null, g_form.getFormElement(), 'cancel_sc_task');
          }
       };

       // Prevents the form from submitting when the dialog first loads
       return false;
    }

다음 코드 예제는 GlideModal.get().destroy() 를 사용하여 클라이언트 스크립트에서 모달을 닫는 방법을 보여줍니다. UI 페이지 HTML: `<button onclick="closeMe()">닫기</button>` 단추를 선언해야 합니다.

    function closeGlideModal() {
      try {
        nowapi.GlideModal.get().destroy();
      } catch (err) {
        console.warn("closeGlideModal ERROR: " + err.message);
        var x = document.getElementById('THE_NAME_OF_YOUR_UI_PAGE' + '_closemodal');
        if (x) {
          x.click();
        } else {
          console.warn("No 'X' close button found!");
        }
      }
    }

    function closeMe() {
      setTimeout(function() {
        closeGlideModal();
      }, 100);
    }

## GlideModal(넥스트 경험) - get(문자열 ID) {#ariaid-title4}

지정된 UI 페이지 이름으로 식별되는 GlideModal 객체를 반환합니다.
이 메서드를 사용하여 `GlideModal.get().destroy()`와 같은 다른 GlideModal 작업에 사용할 GlideModal 객체를 가져옵니다.
{#GModNX-get_S__table_vwy_xjz_3v__entry__3}{#GModNX-get_S__GMod-get-id-entry}

| 이름 | 유형 | 설명 |
|-|-|-|
| ID | 문자열 | 모달과 연결된[UI 페이지](https://servicenow-prod.fluidtopics.net/nJLHJtY8ImMRu0r2EOZ5OA#r_UIPages "UI 페이지를 사용하여 양식, 대화 상자, 목록 및 기타 UI 구성요소를 만들고 표시할 수 있습니다.") 의 이름입니다. 기본 시스템에 제공되는 `glide_modal_confirm` 또는 `glide_modal_info` 모달을 지정할 수도 있습니다. 테이블: UI 페이지 \[sys_ui_page\] |
[표 4. 매개변수]

{#GModNX-get_S__table_vwy_xjz_3v} {#GModNX-get_S__table_wwy_xjz_3v__entry__2}{#GModNX-get_S__GMod-get-return-entry}

| 유형 | 설명 |
|-|-|
| GlideModal | 요청된 GlideModal 객체입니다. |
[표 5. 반환]

{#GModNX-get_S__table_wwy_xjz_3v}  
이 예제에서는 get() 메서드를 사용하여 destroy() 메서드를 사용하여 닫으려는 모달을 가져오는 방법을 보여 줍니다.

    // If the modal was initially created like this:

    var dialog = new nowapi.GlideModal("glide_modal_confirm"); 
    dialog.render();

    // Code using the modal
    ...

    // Now use the get() and destroy() methods to close the modal
    var glideModal = new nowapi.GlideModal().get("glide_modal_confirm");
    glideModal.destroy();

    // You could also code it like this:
    // GlideModal.prototype.get('glide_modal_confirm').destroy();

## GlideModal ()넥스트 경험 - getID() {#ariaid-title5}

GlideModal ID를 반환합니다.
{#GModNX-getID__table_ow3_nr1_sfc__entry__3}

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

{#GModNX-getID__table_ow3_nr1_sfc} {#GModNX-getID__table_pw3_nr1_sfc__entry__2}

| 유형 | 설명 |
|-|-|
| 문자열 | GlideModal의 ID입니다. |
[표 7. 반환]

{#GModNX-getID__table_pw3_nr1_sfc}  
다음 예제에서는 인스턴스에서 GlideModal ID를 가져오는 방법을 보여줍니다.

    var id = modal.getID();
    console.log('modal id', id);

## GlideModal(넥스트 경험) - getPreference(문자열 이름, 문자열 값) {#ariaid-title6}

지정된 기본 설정(속성)의 값을 반환합니다.
모달을 생성하는 작업을 호출하면 일반적으로 메서드를 [GlideModal(넥스트 경험) - setPreference(문자열 이름, 문자열 값)](https://servicenow-prod.fluidtopics.net/FZsWbo7SHRwS6QLjC8WFmQ#GModNX-setPreference_S_S "현재 양식의 지정된 필드를 지정된 값으로 설정합니다.") 사용하여 모달에 필요한 기본 설정도 생성됩니다. 그런 다음 UI 페이지 클라이언트 스크립트는 이 메서드를 사용하여 이러한 기본 설정을 사용할 수 있습니다.
{#GModNX-getPreference_S_S__table_r2h_mrs_3v__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 이름 | 문자열 | 검색할 기본 설정 값의 이름입니다. 이 값은 setPreference() 메서드를 사용하여 모달에서 이전에 설정되었어야 합니다. |
| 값 | 문자열 | 검색할 기본 설정 값입니다. 이 값은 setPreference() 메서드를 사용하여 모달에서 이전에 설정되었어야 합니다. |
[표 8. 매개변수]

{#GModNX-getPreference_S_S__table_r2h_mrs_3v} {#GModNX-getPreference_S_S__table_s2h_mrs_3v__entry__2}{#GModNX-getPreference_S_S__GMod-getPreference-return-entry}

| 유형 | 설명 |
|-|-|
| 문자열 | 지정된 기본 설정 값입니다. |
[표 9. 반환]

{#GModNX-getPreference_S_S__table_s2h_mrs_3v}  
이 예시에서는 기본 설정을 설정한 후 지정된 모달에서 해당 기본 설정을 검색하는 간단한 경우를 보여줍니다.

    var dialog = new nowapi.GlideModal('UI_dialog_name');
    //Sets the dialog title
    dialog.setTitle('Modal title');

    //Sets the value of the preference table
    dialog.setPreference('table', 'incident');

    //Gets the value of the preference table
    var title = dialog.getPreference('table');

## GlideModal(넥스트 경험) - getPreferences() {#ariaid-title7}

모달과 연결된 모든 기본 설정과 값을 반환합니다.
{#GModNX-getPreferences__table_jvd_bt1_sfc__entry__3}

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

{#GModNX-getPreferences__table_jvd_bt1_sfc} {#GModNX-getPreferences__table_s2h_mrs_3v__entry__2}{#GModNX-getPreferences__GMod-getPreference-return-entry}

| 유형 | 설명 |
|-|-|
| 문자열 | 지정된 기본 설정 값입니다. |
[표 11. 반환]

{#GModNX-getPreferences__table_s2h_mrs_3v}  
이 예시에서는 기본 설정을 설정한 후 지정된 모달에서 해당 기본 설정을 검색하는 간단한 경우를 보여줍니다.

    var dialog = new nowapi.GlideModal('UI_dialog_name');
    //Sets the dialog title
    dialog.setTitle('Modal title');

    //Sets the value of the preference table
    dialog.setPreference('table', 'incident');

    //Gets the value of the preference table
    var title = dialog.getPreference('table');

## GlideModal(넥스트 경험) - 렌더링() {#ariaid-title8}

모달에서 API가 인스턴스화될 때 지정된 UI 페이지를 렌더링합니다. UI에 표시할 모달을 정의한 후 이 메서드를 호출해야 합니다.
UI 페이지를 사용하여 모달의 컨텐츠를 생성할 때 이 메서드를 호출합니다. 모달 내에 HTML을 표시하려면 [renderWithContent(String html)](https://servicenow-prod.fluidtopics.net/FZsWbo7SHRwS6QLjC8WFmQ#GModNX-renderWithContent_S "지정된 문자열 기반 HTML 컨텐츠로 모달을 표시합니다.") 를 호출하여 모달을 렌더링합니다.
{#GModNX-render__table_zky_hpy_3v__entry__3}

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

{#GModNX-render__table_zky_hpy_3v} {#GModNX-render__table_aly_hpy_3v__entry__2}

| 유형 | 설명 |
|-|-|
| 없음 |   |
[표 13. 반환]

{#GModNX-render__table_aly_hpy_3v}  
다음 코드 예제에서는 UI 페이지 "UI_dialog_name"를 사용하여 GlideModal 개체를 인스턴스화하고, 모달의 제목과 너비를 설정한 다음, UI(렌더링)에 모달을 표시하는 방법을 보여 줍니다.

    var dialog = new nowapi.GlideModal("UI_dialog_name");

    //Set the dialog title and width
    dialog.setTitle('Show title');		      	
    dialog.setWidth(550);

    //Display the dialog
    dialog.render();

## GlideModal(넥스트 경험) - renderWithContent(String html) {#ariaid-title9}

지정된 문자열 기반 HTML 컨텐츠로 모달을 표시합니다.
HTML에서 모달 콘텐츠를 파생할 때 render() 메서드 대신 renderWithContent() 메서드를 사용합니다.
{#GModNX-renderWithContent_S__table_xss_3hz_3v__entry__3}{#GModNX-renderWithContent_S__GMod-renderWithContent_S-html-entry}

| 이름 | 유형 | 설명 |
|-|-|-|
| HTML | 문자열 | 모달에 표시할 HTML 콘텐츠입니다. |
[표 14. 매개변수]

{#GModNX-renderWithContent_S__table_xss_3hz_3v} {#GModNX-renderWithContent_S__table_yss_3hz_3v__entry__2}

| 유형 | 설명 |
|-|-|
| 없음 |   |
[표 15. 반환]

{#GModNX-renderWithContent_S__table_yss_3hz_3v}  
이 코드 예제에서는 사용자가 선택할 수 있는 선택 목록이 포함된 전달된 HTML 문자열을 사용하여 생성된 모달을 표시하는 방법을 보여 줍니다.

    function cancelDialog(){

      var dialog = new nowapi.GlideModal('cancelTask');

      // Sets the dialog title
      dialog.setTitle('Cancel Task');

      // Set up valid custom HTML to display
      dialog.renderWithContent('<div style="padding:15px">
        <p>What action do you want to take?</p>
        <p><select name="cancellation" id="taskCancellation" class="form-control">
        <option value="cancelOnly" role="option">Cancel task but keep requested item open
        </option>
        <option value="cancelAll" role="option">Cancel this and all other tasks, closing the
        requested item</option></select></p><div style="padding:5px;float:right"><button      style="padding:5px;margin-right:10px onclick="window.changeTaskAction(this.innerHTML,     jQuery(\'#taskCancellation\').val())" class="btn btn-default">Abort</button>
        <button style="padding:5px" class="btn btn-primary"      onclick="window.changeTaskAction(this.innerHTML,jQuery(\'#taskCancellation\').val())">
        Cancel Task</button></div></div>');

      // Use the windows object to ensure the code is accessible from the modal dialog
      window.changeTaskAction = function(thisButton, thisAction){

        // Close the GlideModal dialog window
        dialog.destroy();

        // Submit to the back-end
        if(thisButton=='Cancel Task'){
          if(thisAction=="cancelAll"){
            // Closed Incomplete -- will close the Requested Item and all other open tasks
            g_form.setValue('state',4);
          }else{
            // Closed Skipped -- will only close this task
            g_form.setValue('state',7);
          }
             //Regular ServiceNow form submission
             gsftSubmit(null, g_form.getFormElement(), 'cancel_sc_task');
          }
       };

       // Prevents the form from submitting when the dialog first loads
       return false;
    }

## GlideModal(넥스트 경험) - setDialog(String dialogName) {#ariaid-title10}

대화 상자 이름을 GlideModal의 테이블 기본 설정으로 설정합니다.
{#GModNX-setDialog_S__table_qqw_yr1_sfc__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 대화 상자 이름 | 문자열 | 대화 상자 이름 및 해당 기본 설정 테이블로 사용할 모달 대화 상자의 이름입니다. 참조 : * [setPreference()](https://servicenow-prod.fluidtopics.net/FZsWbo7SHRwS6QLjC8WFmQ#GModNX-setPreference_S_S "현재 양식의 지정된 필드를 지정된 값으로 설정합니다.") * [setPreferenceAndReload()](https://servicenow-prod.fluidtopics.net/FZsWbo7SHRwS6QLjC8WFmQ#GModNX-setPrefAndReload_A "지정된 기본 설정을 설정한 후 모달을 다시 로드합니다.") {#GModNX-setDialog_S__ul_ht2_5vb_sgc} |
[표 16. 매개변수]

{#GModNX-setDialog_S__table_qqw_yr1_sfc} {#GModNX-setDialog_S__table_rqw_yr1_sfc__entry__2}

| 유형 | 설명 |
|-|-|
| 없음 |   |
[표 17. 반환]

{#GModNX-setDialog_S__table_rqw_yr1_sfc}  
이 예에서는 모달 대화 상자 이름을 테이블 기본 설정으로 설정하는 방법을 보여줍니다.

    var dialog = new nowapi.GlideModal('change_confirm_reason', false, 648, 250);
    dialog.setTitle(new GwtMessage().getMessage('Cancel Change Request'));
    dialog.setPreference('focusTrap', true);
    dialog.setDialog('onPromptComplete');
    dialog.setPreference('onPromptCancel', onPromptCancel);
    dialog.on('closeconfirm', onPromptCancel);
    dialog.setPreference('buttonLabelComplete', new GwtMessage().getMessage('OK'));
    dialog.setPreference('buttonLabelCancel', new GwtMessage().getMessage('Cancel'));
    dialog.render();

## GlideModal (넥스트 경험) - setPreferenceAndReload(객체 속성) {#ariaid-title11}

지정된 기본 설정을 설정한 후 모달을 다시 로드합니다.
{#GModNX-setPrefAndReload_A__table_u3v_jqy_3v__entry__3}{#GModNX-setPrefAndReload_A__GMod-setPreferenceAndReload-properties-entry}

| 이름 | 유형 | 설명 |
|-|-|-|
| 속성 | 객체 | 형식의 기본 설정으로 설정할 이름-값 쌍입니다. |
[표 18. 매개변수]

{#GModNX-setPrefAndReload_A__table_u3v_jqy_3v} {#GModNX-setPrefAndReload_A__table_v3v_jqy_3v__entry__2}

| 유형 | 설명 |
|-|-|
| 안 함 |   |
[표 19. 반환]

{#GModNX-setPrefAndReload_A__table_v3v_jqy_3v}  
이 예에서 setPreferenceAndReload() 함수는 기본 설정을 설정하고 업데이트된 기본 설정으로 모달을 다시 로드합니다. 모달은 초기 기본 설정으로 렌더링되고 5초 후에 setPreferenceAndReload() 가 호출되어 업데이트된 기본 설정으로 모달을 다시 로드합니다.

     // UI Page to render in the GlideModal is 'glide_modal_confirm'
     var glideModal = new nowapi.GlideModal("glide_modal_confirm", false, 600);
     glideModal.setTitle(getMessage("Confirmation"));
     glideModal.setPreference("body", getMessage("Are you sure you want to reject this deal registration? This action cannot be undone."));
     glideModal.setPreference('buttonLabelComplete', getMessage("Reject"));
     glideModal.setPreference('buttonLabelCancel', getMessage("Cancel"));
     glideModal.render();

     var preferences = {
         "body": "THIS IS THE UPDATED BODY PREFERENCE",
         "buttonLabelComplete": "NEW REJECT",
         "buttonLabelCancel": "NEW CANCEL"
     };

     setTimeout(function() {
         glideModal.setPreferenceAndReload(preferences);
     }, 5000);

## GlideModal(넥스트 경험) - setPreference(문자열 이름, 문자열 값) {#ariaid-title12}

현재 양식의 지정된 필드를 지정된 값으로 설정합니다.
{#GModNX-setPreference_S_S__table_cvd_zqs_3v__entry__3}{#GModNX-setPreference_S_S__GMod-setPreference-name-entry}{#GModNX-setPreference_S_S__GMod-setPreference-value-entry}

| 이름 | 유형 | 설명 |
|-|-|-|
| 이름 | 문자열 | 업데이트할 양식 필드의 이름입니다. 현재 양식에 이 필드가 없으면 요청이 무시됩니다. |
| 값 | 문자열 | 지정된 양식 필드에 저장할 값입니다. |
[표 20. 매개변수]

{#GModNX-setPreference_S_S__table_cvd_zqs_3v} {#GModNX-setPreference_S_S__table_dvd_zqs_3v__entry__2}

| 유형 | 설명 |
|-|-|
| 없음 |   |
[표 21. 반환]

{#GModNX-setPreference_S_S__table_dvd_zqs_3v}  
다음 코드 예제에서는 기본 설정을 'task'로 설정하고 name 기본 설정을 'value'로 설정하는 table 방법을 보여 줍니다.

    var dialog = new nowapi.GlideModal('UI_dialog_name');

    //Set the dialog title
    dialog.setTitle('Show title'); 

    //Set the desired preferences
    dialog.setPreference('table', 'task'); 			
    dialog.setPreference('name', 'value');        	

    //Opens the dialog
    dialog.render();

## GlideModal(넥스트 경험) - setTitle(String title) {#ariaid-title13}

모달의 제목을 설정합니다.
{#GModNX-setTitle_S__table_kxd_l5s_3v__entry__3}{#GModNX-setTitle_S__GMod-setTitle-title-entry}

| 이름 | 유형 | 설명 |
|-|-|-|
| 직위 | 문자열 | 모달 제목에 표시할 텍스트입니다. |
[표 22. 매개변수]

{#GModNX-setTitle_S__table_kxd_l5s_3v} {#GModNX-setTitle_S__table_lxd_l5s_3v__entry__2}

| 유형 | 설명 |
|-|-|
| 없음 |   |
[표 23. 반환]

{#GModNX-setTitle_S__table_lxd_l5s_3v}  
다음 코드 예제에서는 모달 제목을 <kbd class="ph userinput">업데이트할 테이블</kbd>로 설정하는 방법을 보여 줍니다.

    var dialog = new nowapi.GlideModal('UI_dialog_name');

    //Sets the dialog title
    dialog.setTitle('Table to update'); 
    dialog.setPreference('table', 'task'); 			      	
    dialog.setWidth(550);

    //Opens the dialog
    dialog.render();

## GlideModal ()넥스트 경험 - setWidth(숫자/문자열 너비) {#ariaid-title14}

모달의 너비를 설정합니다.
[GlideModal()](https://servicenow-prod.fluidtopics.net/FZsWbo7SHRwS6QLjC8WFmQ#GModNX-GlideModal_S_B_N "GlideModal 클래스의 인스턴스를 만듭니다.") 생성자를 사용하여 API를 처음 인스턴스화할 때 모달의 너비를 설정할 수도 있습니다.
{#GModNX-setWidth_N__table_msx_wts_3v__entry__3}{#GModNX-setWidth_N__GMod-setWidth-width-entry}

| 이름 | 유형 | 설명 |
|-|-|-|
| width | 숫자 또는 문자열 | 모달의 너비(픽셀 단위) 또는 모달 CSS 클래스입니다. 픽셀 너비가 전달되면 지정된 너비를 해당 CSS 클래스와 정렬합니다. 가능한 모달 CSS 클래스: * modal-alert: (300 px) 지정된 너비가 0에서 349 픽셀일 때 할당됩니다. * modal-sm: (400px) 지정된 너비가 350에서 449픽셀일 때 할당됩니다. * modal-md: (600px) 지정된 너비가 450에서 649픽셀일 때 할당됩니다. * modal-lg: (900 px) 지정된 너비가 650에서 900픽셀일 때 할당됩니다. {#GModNX-setWidth_N__ul_omg_1fc_mcc} 최대 너비: 900픽셀 |
[표 24. 매개변수]

{#GModNX-setWidth_N__table_msx_wts_3v} {#GModNX-setWidth_N__table_nsx_wts_3v__entry__2}

| 유형 | 설명 |
|-|-|
| 없음 |   |
[표 25. 반환]

{#GModNX-setWidth_N__table_nsx_wts_3v}  
다음 코드 예제에서는 모달 너비를 550픽셀로 설정하는 방법을 보여 줍니다.

    var dialog = new nowapi.GlideModal('UI_dialog_name');

    //Sets the dialog title
    dialog.setTitle('Show title'); 
    dialog.setPreference('name', 'value'); 			      	
    dialog.setWidth(550);

    //Opens the dialog
    dialog.render();

## GlideModal(넥스트 경험) - switchView(문자열 newView) {#ariaid-title15}

뷰를 변경하고 모달을 다시 로드합니다.
{#GModNX-switchView_S__table_ovv_5py_3v__entry__3}{#GModNX-switchView_S__GMod-switchView-newView-entry}

| 이름 | 유형 | 설명 |
|-|-|-|
| 새 뷰 | 문자열 | 사용할 뷰입니다. |
[표 26. 매개변수]

{#GModNX-switchView_S__table_ovv_5py_3v} {#GModNX-switchView_S__table_pvv_5py_3v__entry__2}

| 유형 | 설명 |
|-|-|
| 안 함 |   |
[표 27. 반환]

{#GModNX-switchView_S__table_pvv_5py_3v}

## GlideModal(넥스트 경험) - 유형() {#ariaid-title16}

유형을 GlideModal로 반환합니다.
{#GModNX-type__table_sw4_tt1_sfc__entry__3}

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

{#GModNX-type__table_sw4_tt1_sfc} {#GModNX-type__table_tw4_tt1_sfc__entry__2}

| 유형 | 설명 |
|-|-|
| 문자열 | 유형이 GlideModal임을 나타내는 문자열을 반환합니다. |
[표 29. 반환]

{#GModNX-type__table_tw4_tt1_sfc}

## GlideModal ()넥스트 경험 - updateTitle() {#ariaid-title17}

GlideModal setTitle() 메서드를 사용하여 지정된 제목을 업데이트합니다.
변경 내용을 커밋하려면 항상 updateTitle()을 사용하여 모달 제목을 지정하려면 먼저 호출 [GlideModal(넥스트 경험) - setTitle(String title)](https://servicenow-prod.fluidtopics.net/FZsWbo7SHRwS6QLjC8WFmQ#GModNX-setTitle_S "모달의 제목을 설정합니다.") 해야 합니다.
{#GModNX-updateTitle__table_hp5_ncp_sfc__entry__3}

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

{#GModNX-updateTitle__table_hp5_ncp_sfc} {#GModNX-updateTitle__table_ip5_ncp_sfc__entry__2}

| 유형 | 설명 |
|-|-|
| 없음 |   |
[표 31. 반환]

{#GModNX-updateTitle__table_ip5_ncp_sfc}  
다음 예제에서는 setTitle() 및 updateTitle() 을 각각 호출하여 모달의 제목을 설정하고 업데이트하는 방법을 보여줍니다.

    var modal = new nowapi.GlideModal();
    modal.renderWithContent('TEST CONTENT');

    setTimeout(function() {
        modal.setTitle("TEST setTitle() AND updateTitle() METHODS"); // will only update the `title` prop, updateTitle() must be called to see change
        modal.updateTitle();
    }, 3000);


