針對 Service Manager Authoring Tool 範例案例自訂預設事件表單Customize the default incident form for the Service Manager Authoring Tool sample scenario

重要

此版本的 Service Manager 已達到終止支援,建議您 升級至 Service Manager 2019This version of Service Manager has reached the end of support, we recommend you to upgrade to Service Manager 2019.

此範例案例說明如何在 Service Manager Authoring Tool 中將簡單的自訂套用到預設表單。This sample scenario describes how to apply simple customizations to a default form in the Service Manager Authoring Tool. 在這個案例中,您所自訂的事件表單就是與事件互動的預設表單。In this scenario, you customize the Incident form, which is the default form for interacting with incidents. 您可以在 Authoring Tool 中自訂表單,然後將自訂表單儲存到新的管理元件中。You customize the form in the Authoring Tool and then save the customized form in a new management pack. 然後,在 Service Manager 主控台中,匯入這個新的管理元件。Then, in the Service Manager console, you import this new management pack. 之後,每當您建立或查看事件時,Service Manager 會顯示自訂表單。Afterwards, whenever you create or view an incident, Service Manager displays the customized form. 事件表單 System.WorkItem.Incident.ConsoleForm 是在 [Service Manager 事件管理庫] 管理組件中定義。The Incident form, System.WorkItem.Incident.ConsoleForm, is defined in the Service Manager Incident Management Library management pack.

自訂預設事件表單的範例案例包含三個步驟。The sample scenario for customizing the default Incident form consists of three steps.

步驟1:查看預設事件表單Step 1: View the default incident form

在您自訂表單之前,請先在 Service Manager 主控台中查看預設表單,並在表單上找出您想要自訂的元素。Before you customize the form, view the default form in the Service Manager console and identify elements on the form that you want to customize. 例如,您可以規劃重新排列表單上的各個文字方塊。For example, you can plan to rearrange various text boxes on the form.

若要檢視預設事件表單To view the default incident form

  1. 在 Service Manager 主控台中,按一下 [ 工作專案]。In the Service Manager console, click Work Items.

  2. 按一下 [ 工作專案 ] 窗格中的 [ 事件管理]。In the Work Items pane, click Incident Management.

  3. 在 [工作] 窗格中,按一下 [建立事件]。In the Tasks pane, click Create Incident.

  4. 請參閱 事件 表單。Review the Incident form. 這個表單是您用來建立與檢視事件的表單。This form is the form that you use to create and view incidents. 您可以在表單中找出想要自訂的元素。You can identify elements in the form that you might want to customize.

步驟2:自訂預設事件表單Step 2: Customize the default incident form

您可以使用下列程式,在 Authoring Tool 中自訂預設事件表單。Use the following procedure to customize the default Incident form in the Authoring Tool.

若要自訂事件表單To customize the Incident form

  1. 按一下 [ 開始],依序指向 [ 程式]、[ Microsoft System Center] 和 [ Service Manager <version> Authoring],然後按一下 [ Service Manager Authoring Tool]。Click Start, point to Programs, point to Microsoft System Center, point to Service Manager <version> Authoring, and then click Service Manager Authoring Tool.

  2. 在 Authoring Tool 中,按一下 [ File],然後按一下 [ 新增]。In the Authoring Tool, click File, and then click New.

  3. 在 [ 新增管理元件 ] 對話方塊的 [ 檔案名 ] 方塊中,輸入 MyIncidentFormCustomizations,然後按一下 [ 儲存]。In the New Management Pack dialog box, in the File name box, type MyIncidentFormCustomizations, and then click Save.

    請注意, MyIncidentFormCustomizations 管理元件現在會列在 [ 管理元件瀏覽器] 中。Note that the MyIncidentFormCustomizations management pack is now listed in the Management Pack Explorer.

  4. 在 [ 表單瀏覽器 ] 窗格中,找出並以滑鼠右鍵 - 按一下 [ system.workfitem.incident.consoleform ] 表單,這是預設事件表單,然後按一下 [ View]。In the Form Browser pane, locate and then right-click the System.WorkfItem.Incident.ConsoleForm form, which is the default Incident form, and then click View.

    請注意,包含預設事件表單的 Service Manager Incident Management Library 管理元件現在會列在 [ 管理元件瀏覽器] 中。Note that the Service Manager Incident Management Library management pack, which contains the default Incident form, is now listed in the Management Pack Explorer.

  5. 在 [撰寫中] 窗格中,按一下 [ 自訂]。In the authoring pane, click Customize.

  6. 在 [ 目標管理元件 ] 對話方塊中,選取 [ MyIncidentFormCustomizations],然後按一下 [確定]In the Target Management Pack dialog box, select MyIncidentFormCustomizations, and then click OK.

  7. 等候撰寫窗格顯示您要自訂的表單。Wait for the authoring pane to display the form that you are customizing. 您現在可以將控制項(例如 標籤文字方塊影像)新增到表單。You can now add controls, such as a Label, a Text Box, or an Image, to the form. 確定 [ 詳細資料 ] 視窗是開啟且可見的,如此您就可以流覽和修改控制項的屬性。Ensure that the Details window is open and visible, so that you can browse and modify properties of the controls.

  8. 在 [ Management Pack Explorer] 中,以滑鼠右鍵 - 按一下 [ MyIncidentFormCustomizations],然後按一下 [ 儲存]。In the Management Pack Explorer, right-click MyIncidentFormCustomizations, and then click Save.

  9. 離開 Authoring Tool。Exit the Authoring Tool.

步驟3:使用自訂的預設事件表單Step 3: Use the customized default incident form

使用下列程式,在 Service Manager 主控台中查看和使用自訂事件表單。Use the following procedure to view and use the customized Incident form in the Service Manager console.

若要使用自訂的 System.WorkItem.Incident.ConsoleForm 表單To use the customized System.WorkItem.Incident.ConsoleForm form

  1. 啟動 Service Manager 主控台,然後按一下 [系統 管理]。Start the Service Manager console, and then click Administration.

  2. 在 [系統 管理 ] 窗格中,按一下 [ 管理元件]。In the Administration pane, click Management Packs.

  3. 在 [工作] **** 窗格中按一下 [匯入] ****。In the Tasks pane, click Import.

  4. 在 [ 選取要匯入的管理元件 ] 對話方塊中,按一下 MyIncidentFormCustomizations.xml 管理元件檔案。In the Select Management Packs to Import dialog box, click the MyIncidentFormCustomizations.xml management pack file. 按一下 [開啟]。Click Open.

  5. 在 [匯 入管理元件 ] 對話方塊中,按一下 [匯 ],等候管理元件匯入,然後按一下 [確定]In the Import Management Packs dialog box, click Import, wait for the management pack to be imported, and then click OK.

  6. 按一下 [ 事件], 然後在 [ 工作] 窗格中按一下 [ 建立事件]。Click Incidents, and then in the Tasks pane, click Create Incident.

    請注意,顯示的 事件 表單會是您的自訂表單。Note that the Incident form that is displayed is your customized form.

  7. 填寫表單,然後儲存事件。Fill in the form, and then save the incident.

後續步驟Next steps