인시던트에서 지식 문서를 만들 수 있는 UI 작업 만들기
인시던트 양식에 지식 확인란을 추가하는 UI 작업을 만듭니다.
시작하기 전에
프로시저
- 다음으로 이동 시스템 UI > UI 작업.
- 새로 만들기를 클릭합니다.
-
다음 필드에 내용을 입력합니다.
표 1. UI 작업 양식 필드 설명 이름 지식 생성 테이블 인시던트 작업 이름 create_knowledge - 클라이언트 확인란을 선택합니다.
- 목록 v3 호환 확인란을 선택합니다.
- 양식 버튼 확인란을 선택합니다.
- Onclick 필드에 createKnowledgeClient()를 입력합니다.
- 조건 필드에 gs.getProperty("enable_kcs_incident") == 'true' &; new global을 입력합니다. CSMTableMapUtil (current).findMapByName("incident_kcs_article") &; new 전역. KBKnowledge().canCreate()를 사용합니다.
-
스크립트 필드에 다음 코드를 입력합니다.
function createKnowledgeClient() { if (g_form.modified) { alert(new GwtMessage().getMessage('You have unsaved changes. Please save them to continue.')); }else{ //Call the UI Action again but skip the 'onclick' function gsftSubmit(null, g_form.getFormElement(), 'create_knowledge'); //MUST call the 'Action name' set in this UI Action } } //Code that runs without 'onclick' //Ensure call to server-side function with no browser errors if (typeof window == 'undefined') CreateKnowledgeServer(); function CreateKnowledgeServer(){ current.update(); var map = new global.CSMTableMapUtil (current); map.findMapByName("incident_kcs_article"); var targetURL = map.getTargetURL(); if(targetURL) action.setRedirectURL(targetURL[0]); }