Lost my PDI, imported my update sets, and my scoped app was missing: here’s why
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
29m ago - last edited 27m ago
What happened
I’m enrolled on the ServiceNow Global App Dev Project, building a scoped application called Workspace Reservation Management. I completed the first three stories and, as a backup, exported each story’s update set to XML.
Then my PDI went through maintenance and I lost access to it. I requested a new PDI and imported my update sets so I wouldn’t have to rebuild everything.
When I opened the first update set, WRM STRY0010001 Create Scoped Application, the scoped application itself and its three roles weren’t there.
Why it happened
When you create a new scoped application in ServiceNow Studio, the platform captures the application record and any roles you create in the wizard immediately. They don’t go into the update set you have selected. Instead:
- Every application scope keeps its own current update set.
- A brand-new scope doesn’t have one yet, so ServiceNow automatically creates an update set called Default for that application.
- The application record and roles go into that Default update set.
Leaving my story’s update set empty:
How to avoid it
Do this straight after creating a scoped application, before building anything else:
- Switch your application scope to the new application/custom scope.
- Open sys_update_xml.list and filter on Update set = Default and Application = your application.
- Select the records and change their Update set to your story’s update set. Use list edit.
- Check that the application’s Default update set now has 0 customer updates.
Then, before you export:
- Open the update set’s Customer Updates list and confirm the application record and roles are in it.
- An exported update set only contains the records that were in it at the time.
Lesson learned
Export your update sets regularly. PDIs can be reclaimed or go down for maintenance. But most importantly, check what’s inside an update set before you rely on it as a backup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
19m ago
Hi @BiancaKerchhoff ,
Good write-up, and your diagnosis is right. When you create a scoped app, the sys_app record and the roles made in the wizard go into the scope's Default update set, not the one you had selected.
A few points that might help with recovery and with avoiding this in future:
Check whether the old PDI is really gone. Sign in to the developer portal and see if the instance is just hibernating or waiting to be woken up. If it comes back, open the app's Default update set, move or merge its records into your story update set, and export again.
If the old PDI can't be recovered, don't create a new app with the same name and expect the imported files to attach to it. The new app gets a new sys_id, and the files in your update sets still point to the old scope sys_id. That's why the preview or commit may show errors or put records in the wrong place. The cleanest fix is usually to redo story 1 (create the app and its roles) in the new PDI, then rebuild or re-import the later stories against that scope, checking the preview errors carefully.
For backing up scoped apps, update sets aren't the most reliable option. Better choices:
- Link the app to a Git repository through Source Control in Studio, and commit after each story. This is the recommended approach for scoped apps and survives a lost PDI.
- Or use the "Publish to Update Set" related link on the application record. It builds one update set containing every file in the app, including the app record itself, which you can then export.
Whichever you use, test the backup by restoring it to a clean instance before you rely on it.
Hope this helps. If it does, please mark it as helpful or accept it as the solution.