---
sourceDocument: 요코하마 직원 서비스 관리
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ko-KR/yokohama/employee-service-management

 Release :

    - yokohama

ft:locale :

    - ko-KR

ft:publication_title :

    - 요코하마 직원 서비스 관리

ft:clusterId :

    - emplsm

bundleId :

    - emplsm

workflow :

    - Employee


---

# 문서 템플릿 사용: 사용자 지정 사용 사례

# 문서 템플릿 사용: 사용자 지정 사용 사례 {#ariaid-title1}

* 릴리스 버전: Yokohama
* 
* 업데이트 날짜 2025년 01월 30일
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 소요 시간: 2분

HR Service Delivery 외부에서 문서 템플릿을 사용하는 방법을 이해합니다.

## 시작하기 전에

필요한 역할: admin

## 프로시저

1. 지정된 테이블에 대한 문서 템플릿을 정의합니다(예: 인시던트 테이블).
2. 문서 템플릿에서 PDF 문서를 생성하려면 다음 API를 사용합니다.  

       /**
       * Description: Method to generate a PDF from a document template.
       * @param {GlideRecord} recordId (GlideRecord of task table)
       * @param {documentTemplateId} docTemplateId (sysId of document template)
       * @param {String} pdfName name of generated pdf (Optional, if not passed then it will be taken from template name)
       * @return {sysId} (sysId of the attachment)
       */
       new sn_doc.GenerateDocumentAPI().generateDocumentForTask(recordId, documentTemplateId, pdfName)

3. 문서 템플릿에 대해 참가자가 구성된 경우 다음 API를 사용하여 참가자를 위한 문서 작업을 시작합니다.  

       /**
       * Description: Method to prefill document with mapped values and attach it to record table.
       * @param {GlideRecord} taskGr (GlideRecord of task table)
       * @param {String} htmlBody html body of document (Optional, if not passed then it will be generated from template for html template)
       * @param {SysId} docTemplateId (sysId of document template)
       * @param {String} generatedPdfName name of generated pdf (Optional, if not passed then it will be taken from template name)
       * @param {String} documentId (word template attachment sysId) (Only for word templates)
       * @return {boolean} true/false
       */
       new sn_doc.GenerateDocumentAPI().initiateDocumentTasks(taskGr, htmlBody, docTemplateId, generatedPdfName, documentId)

4. 기록과 연결된 문서 작업을 보려면 다음을 수행합니다.  
   1. 기록(예: 인시던트 기록)을 엽니다.
   2. 관련 목록을 구성합니다.

      슬러쉬버킷이 열립니다. 문서 작업 추가 - \> 상위를 선택하고 저장합니다.
      기록과 연결된 문서 작업은 문서 작업 관련 목록에 표시됩니다.

{#doc-temp-gen__ol_gz5_sjz_zyb}
**관련 개념**   

* [사용 문서 템플릿: HR 서비스 제공](https://servicenow-prod.fluidtopics.net/_bSd4_mTR0Fb4_WfE0jfiA "HR 서비스 제공 애플리케이션과 함께 사용하는 문서 템플릿 방법을 알아봅니다.")  
**관련 태스크**   

* [문서 작업 수행](https://servicenow-prod.fluidtopics.net/u1aSqR9SilC31_e5GpfQeQ "에서 문서 작업을 직원 센터완료합니다.")
* [문서 템플릿에서 가이드 투어 사용](https://servicenow-prod.fluidtopics.net/mPPKLI0q4YOKMRafaKTqug "의 문서 템플릿 가이드 투어를 사용하여 문서 템플릿을 생성하는 방법에 대한 지침을 얻을 수 있습니다.")

