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

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 2분
  • HR Service Delivery 외부에서 문서 템플릿을 사용하는 방법을 이해합니다.

    시작하기 전에

    필요한 역할: 관리자

    프로시저

    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. 관련 목록을 구성합니다.기록에서 관련 목록 구성

        슬러쉬버킷이 열립니다. 문서 작업 추가 - > 상위를 선택하고 저장합니다.인시던트 기록에 문서 작업 관련 목록 추가

        기록과 연결된 문서 작업은 문서 작업 관련 목록에 표시됩니다.

        기록 양식에 문서 작업 관련 목록이 나타납니다.