
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
06-16-2025 09:05 AM - edited 06-16-2025 09:05 AM
If you want to make sure that artifacts you create like a knowledge articles are saved within your scoped application, so that users who install your app can access records or articles, read on.
Step-by-Step Solution
Ideally you will want to create records in your scoped app.
1. Best practice: Create a Knowledge Base Scoped to Your App
Create a new Knowledge Base (KB) that is dedicated to your app:
- Go to Knowledge > Administration > Knowledge Bases
-
Click New
-
Give it a meaningful name (something like
My App Knowledge Base
)
2. Create Knowledge Articles Within That Base
-
Make sure you're in your app's scope (it's easy if you open your app with App Engine Studio)
-
Navigate to Knowledge > Articles
- Create articles within your newly created KB
3. Include the record as an Application File
ServiceNow doesn't automatically include KB articles when exporting an application unless explicitly added. Do this:
-
Go to the list of your records (Knowledge Articles or any other you want to include)
-
Click the menu on the right "Actions on selected rows"
-
icon (top left) and select Add to Application File
-
In the "Create Application File from Record" window. Select the option you want for Load When, and then Click OK.
-
Now go to App Engine Studio > Source control > Commit changes
(this option is only available if you have linked your app to a Git repository) - See that the KB or record is ready to be committed to your repo as an application file
- Test in a Clean Instance
-
Install the app (via store or update set) into a clean PDI or sub-prod instance
- Validate that your records are present
-
Note that you can also use the option to add the record to your update set if you only want to share the app via an update set.
- 258 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
This is a solid guide, and it highlights something that often gets overlooked — application records like knowledge articles don’t automatically follow the app unless you explicitly include them. That’s a critical nuance when building scoped applications in ServiceNow.
Here are a few thoughts and perspectives I’d add:
1. Scoping the Knowledge Base Is Crucial
Too often, developers test apps in a dev instance where the global KB already exists, so they never notice that their articles aren’t portable. Scoping a KB specifically to the app is not only best practice — it's necessary for modularity and long-term maintainability, especially when the app is meant for reuse or distribution.
2. App File Inclusion = True Packaging
ServiceNow doesn't treat knowledge articles (or other data records) as app components by default — which is logical from a platform perspective, but it trips up many developers. Using "Add to Application File" ensures the record is treated as part of the app structure. I’d even say this step is essential for any data seeding strategy, not just KBs.
3. Load When Options Matter
When adding records as app files, selecting the right “Load When” option affects whether the data loads on install or only on update. If your article content is foundational (i.e., documentation, setup guidance), set it to load on install. If it's just example data, "on upgrade" or manual loading might make more sense.
4. Test Install on a Clean Instance Is Key
This final step is critical and often skipped. Installing into a clean PDI helps surface any overlooked dependencies — like missing data, improper scoping, or forgotten ACLs. It’s a low-effort but high-value check.
Suggestion for Teams
If your app includes configuration records, knowledge content, templates, or catalog items, make it standard to review what should be exported as part of the app versus what should be seeded by post-install scripts or provisioning flows.
Great post — and a helpful reminder that build ≠ deliver, unless you package it right.