Andrew Barnes

4 minute read

VS Code Extension

Six months after initial release, the ServiceNow Extensions for Visual Studio Code has reached version 1.4. This milestone is significant in that several incremental changes have added up an improved experience. I will include the release notes below and highlight several of the improvements directly. Continue to provide feedback on the idea portal and the dedicated community. Read the FAQ. Not everything I point out will be specifically new to 1.4 but instead is how all these improvements work together for an improved experience.

New utility commands

The command palette (Ctrl+Shift+P) and contextual menu (right-click) have quite a few additions and improvements to existing commands in this version. The contextual menu additions include handy things like Copy Sys_id and Open in Platform. Revert to instance version can come in handy when you need adjustments that should not get synced in your project.

The status bar along the bottom has been pruned to show the most relevant commands.

status bar

File search (my most common command), Sync Project, and Sync file have all been placed prominently in the status bar. Previously present command items are still available but through the command palette.

The comparison with server feature has improved, but from the contextual menu and when the server version has updated since you last synced. When that happens, the conflicting file interface allows you to open the differential and resolve/mark as resolved the conflict as appropriate.



The final improvement to the status bar leads nicely into the next section, which is selecting global update sets when on a global application file.

Global files and Sync

Great strides have been made to improve the experience when dealing with global files in your project. The file search has been flattened and prioritized to present the most common application files. Once those files are selected and brought into your project scratch space, working with them is more intuitive and useful. When syncing a project that contains global files that have been modified locally will present a new screen to interact as below.


You can see in the image above that you can select which of the global files you wish to include in your sync. Additionally, you can toggle the scratch space off entirely for the current project. Before you select which global files to include, you need to set the global scope update set that your application files will be updated too. That process is necessary because your global scoped file updates can’t be placed into your application scope’s update sets.

Background scripts

Right off the bat, I noticed the background scripts area in my project. The additional area to write my background scripts is an excellent quality of life improvement. Files in this area are not part of the project sync to your instance. Another great addition is that all background scripts now prompt which scope to run the background script in. So, the select code in an existing application file uses the context menu to run background script, and the new background script area both support running in the scope of your choosing.

1.4 Release notes

  1. Addition of new utility commands
    • Open a script file in platform- The user can view a file in the platform(instance) through the context menu option of the extension
    • Preview files in instance- The user should be able to preview files in instance
    • Copy sysid to clipboard- The user should be which will help me differentiate between 2 duplicate files
    • Revert file changes to instance version- The user should be able to discard the uncommitted version and reset to the server state
  2. Jelly Intellisense improvements with support for
    • Multiple tags in a single line
    • Single tag spanned across multiple lines
  3. Background script runner enhancements
    • Ability for the user to choose the desired application scope when running scripts in background
    • Dedicated background scripts folder for creating and executing background scripts (folder excluded from sync)
    • One click execution of scripts in background scripts folder using file toolbar icons
    • Run Background Script - Global option has been removed
  4. UX changes
    • Improved UX of File Search results
    • Improved UX of Conflicting Files GUI screen
  5. Update set support for scratch
    • Users can now choose update set for files in scratch folder
    • Sync to default update set in scratch is no longer allowed
  6. Bulk sync support for scratch
    • User can choose if scratch folder can be synced along with sync project
    • Scratch files can be synced using dedicated sync scratch folder command
    • Selective sync is available for files in scratch folder in a GUI screen
    • Users now have the ability to select the desired update set per scope
    • The recently used update set is displayed against each file, so user can take informed decisions when choosing an update set
    • Unified diff view for both participating app and scratch files

Extension Link: