문서 템플릿 사용: 사용자 지정 사용 사례
HR Service Delivery 외부에서 문서 템플릿을 사용하는 방법을 이해합니다.
시작하기 전에
필요한 역할: 관리자
프로시저
- 지정된 테이블에 대한 문서 템플릿(예: 인시던트 테이블)을 정의합니다.
-
문서 템플릿에서 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) -
문서 템플릿에 대해 참가자가 구성된 경우 다음 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) -
기록과 연결된 문서 작업을 보려면 다음을 수행합니다.
- 기록(예: 인시던트 기록)을 엽니다.
- 관련 목록을 구성합니다.
슬러시버킷이 열립니다. 문서 작업 추가 - 상위 > 저장하고 저장합니다.
기록에 연결된 문서 작업이 문서 작업 관련 목록에 표시됩니다.