{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":13358,"path":"employee-service-management/universal-task/config-uiactions-for-ut.md","title":"Create UI actions for your service with Universal Task","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create UI actions for your service with Universal Task\n\nCreate UI actions for your service so that agents can create universal tasks.\n\n## Before you begin\n\nRole required: admin\n\nAdministrators and users with the ui\\_action\\_admin role can define UI actions. The UI actions must be configured for both the ServiceNow AI Platform form and the Agent Workspace form.\n\n## Procedure\n\n1.  Navigate to **All** &gt; **System Definition** &gt; **UI Actions**.\n\n2.  In the UI actions list, click **New**.\n\n3.  Enter the name of the UI action.\n\n    For example, enter the name as `Assign Task`.\n\n4.  Select the service-specific table that Universal Task is being configured for.\n\n    For example, select the Universal Request \\[universal\\_request\\] table for placing the Assign Task UI action on the Universal Task form view or workspace.\n\n    **Note:** For any new UI action, ensure that you always select the appropriate service table.\n\n5.  Clear the **Show insert** check box.\n\n    If the **Show insert** check box remains checked, the UI action to create a task is displayed even when the main ticket is being created.\n\n6.  Select the **Form Button** check box.\n\n7.  In the **Script** field, enter the following script.\n\n    ```\n    var gr = new GlideRecord(\"sn_uni_task_universal_task\");\n    gr.initialize();\n    gr.setValue(\"parent\",current.sys_id);\n    action.openGlideRecord(gr);\n    action.setReturnURL(current);\n    ```\n\n    **Important:** This script belongs in the Script field \\(server-side\\) of the UI Action. Do not copy it into the **Workspace Client Script** field unless you want additional client-side behavior in Workspace.\n\n8.  On the **Workspace** tab, select the **Workspace Form Button** check box.\n\n9.  On the form, fill in the fields.\n\n    For more information on fields and descriptions, see [Create a UI action](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-administration/t_EditingAUIAction.md).\n\n10. Click **Submit**.\n\n\n**Parent Topic:**[Configuring your service for Universal Task](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/universal-task/config-service-for-ut.md)\n\n**Previous topic:**[Assign Universal Task admin role](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/universal-task/assign-ut-admin-role.md)\n\n**Next topic:**[Add a Universal Task related list](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/universal-task/create-relatedlist-ur.md)\n\n"}}