- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Introduction
If your team uses the App Repository to manage scoped applications, you know the post-clone cleanup process can be a real headache. After cloning an instance, an admin has to manually open each app, switch to its scope, and click a UI action to convert it back to development mode — one at a time. For teams with dozens or even hundreds of apps, this can take days.
To solve this, I built two tools (with a big assist from my friend and fellow ServiceNow developer Eric Reimer) that automate both steps:
- Bulk Upgrade My Company Apps — pulls the latest versions of your apps from the App Repo after a clone
- Bulk Convert My Company Apps — converts those apps back to development mode in bulk
Notable Links
1. The code is on Github. You may fork this repo and install it in your instance or copy and paste the contents into your own global app: https://github.com/jon-lind-sn/bulk-store-app-converter (See section below if you need more help with this)
2. The code used for scripting upgrades was slightly modified to target My Company Apps instead of ServiceNow apps and was created by the ServiceNow Wizard: https://snwizard.com/update-apps/
How to set it up and use it
Prerequisites
1. Install this code into your instance https://github.com/jon-lind-sn/bulk-store-app-converter (More help on this below).
2. Before you begin, you'll need to configure a system property that tells the upgrade script which apps to target:
- Property name:
bulk_convert.store_app.convertible_apps - Value: A comma-separated list of the scope names (x_...) of the apps you want to auto-upgrade
Tip: Keep this property configured in production so it's already in place whenever a clone occurs.
Step 1: Publish an Updated App to the App Repo from another Instance
(Skip this step if you're just retrieving an existing version.)
- Make your changes to the scoped application.
- Navigate to App Details and click Publish.
- Confirm the new version number and publish.
Step 2: Bulk Upgrade Apps on the Cloned Instance
Log into the other instance and run the upgrade script:
- Navigate to System Applications → Bulk Upgrade My Company Apps.
- The script will automatically retrieve and install the latest versions of all apps listed in the system property.
- The output log will contain some noise — scroll past the row of asterisks to see the results summary.
- A progress URL will be provided in the output if you want to monitor execution separately.
Step 3: Bulk Convert Apps to Development Mode
WARNING: You must select the Global scope in order to run this utility!
Once the apps are upgraded, convert them to dev mode:
- Navigate to System Applications → Bulk Convert My Company Apps.
- A list of your installed apps will appear. Select the apps you want to convert.
- Click Convert.
- The tool processes each app in order via an Ajax script. After a few seconds, all selected apps will show green — indicating they are ready for development.
Note: The conversion UI was necessary because the underlying conversion action isn't directly callable from the server — the client-side Ajax approach was the only reliable way to drive this in bulk.
New Post-Clone Process
Here's the complete workflow to follow after every clone:
- ✅ Clone the instance
- ✅ Log into the cloned dev instance
- ✅ Run Bulk Upgrade My Company Apps to pull the latest app versions
- ✅ Run Bulk Convert My Company Apps to restore development mode
Get the Code and Make it Your Own
This is meant to be inspiration and is not supported by ServiceNow. Please get the code and build on the learnings.
The script include and bulk conversion UI are available on GitHub. Please fork the repo and use it as a starting point — it's meant as inspiration that you can build on and adapt for your own environment.
First you need to fork the public repo https://github.com/jon-lind-sn/bulk-store-app-converter. Details on how to do that are in the github docs.
You will then import that new copy from your repo. By going to ServiceNow Studio and use the Create > Import App button (in the top right). If you are not familiar how to setup authentication between your instance here is an older studio video that shows you how to set up credentials--follow until minute 4 then switch back to modern Studio and use the Create button on the top right of the home page to Import the app.
You may also just copy and paste the assets into a new script include, UI Page and modules.
Conclusion
This toolset turns what used to be a tedious, sometimes multi-hour (or multi-day) manual process into a few clicks. Unfortunately it's not fully no-touch automatable but I hope it saves a lot of time.
Happy coding!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.