{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":42476,"path":"platform-user-interface/service-portal/create-new-widget.md","title":"Create a new widget","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create a new widget\n\nCreate a new widget to build a custom widget from scratch.\n\n## Before you begin\n\nRole required: admin or sp\\_admin\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Service Portal** &gt; **Service Portal Configuration**.\n\n2.  Select **Widget Editor**.\n\n3.  Click **Create a new widget**.\n\n4.  Enter a name for the new widget.\n\n    The widget ID is created automatically based on the widget name. You can then select **Create test page** to automatically create a page containing the widget.\n\n    \\[Omitted image \"add-widget.png\"\\] Alt text: Create a new widget\n\n    **Note:** After completing development of a widget with a test page, delete the test page. Maintaining test pages can create clutter when managing pages.\n\n5.  Click **Submit**.\n\n    The widget HTML template, client script, and server script display in the widget editor. Basic script templates are included as a guide.\n\n    **Note:** For server-side scripts, you can turn on using the ECMAScript 2021 \\(ES12\\) JavaScript mode if your application uses ES5 Standards mode or Compatibility mode. Scripts in applications with the JavaScript mode set to ECMAScript 2021 \\(ES12\\) use ECMAScript 2021 \\(ES12\\) by default. For more information, see .\n\n    \\[Omitted image \"basic-widget.png\"\\] Alt text: Widget editor IDE\n\n\n**Parent Topic:**[Developing custom widgets](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-user-interface/service-portal/widget-dev-guide.md)\n\n"}}