ServiceNow applications are contained within a project in the VS Code IDE. Import an application from your ServiceNow instance with the help of ServiceNow Extensions for VS Code.

Before you begin

Setup your workspace to create a project and start editing your ServiceNow applications.

Procedure

  1. Click Create Projectin the status bar on the bottom of the VS Code IDE.
    Figure 1. Create Project
    Option to create project

    You can also use a keyboard shortcut, Control+Shift+P on Windows or Command+Shift+P on MacOS, to open the command palette and choose Now: Create Now Project from the list.

    The Create Project wizard opens.
  2. Enter the URL of the ServiceNow instance and press Enter to confirm.
    Include the complete URL for your instance, for example, https://example.service-now.com
    Instance name prompt in Visual Studio Code
  3. When prompted, select the Authentication type.
    Figure 2. Authentication type
    Select authentication type in create project
    • To create a basic application, choose Basic and fill in the following fields, when prompted.
      Table 1. Basic application
      Field Description
      User Name Enter the User name of the ServiceNow instance URL.
      Password Enter the password of the ServiceNow instance URL.
      Note: The user account being used for authenticating must not contain the admin role.
    • To create an OAuth application, choose OAuth application and fill in the following fields, when prompted.
  4. Select the project type when prompted.Create project type command
    Note: You can enable the Packages and Plugins project types by enabling them from the Settings. Navigate to Preferences > Settings > Extensions > Now > Project Settings to enable them.
  5. Select Import Existing.