Skip to tutorial content
Rate module Not yet rated

What Is Application Scope?

3 min read
On this page

In this lesson, you will learn:

  • What application scope is
  • How scope names and prefixes work
  • How to switch your current application

1 A fence around an app

Imagine two teams build apps on the same instance. Both make a table called “Request”. Both write a script called “Utils”. Chaos! 😡 Application scope puts a fence around each app, so its parts have their own names and are protected from other apps.

Key term: Application scope

A namespace that groups an app’s files (tables, scripts, forms, and more) and controls what other apps can do with them.

Two scoped apps on the SNWR instance, each inside its own fence. The Room Booking app has scope x_snwr_rooms, with a table x_snwr_rooms_booking and a script include x_snwr_rooms.RoomUtils. The Vendor Onboarding app has scope x_snwr_vendor, with a table x_snwr_vendor_request. Outside both is the Global scope, with incident, task, and sys_user. Each scope's names start with its prefix, so they never clash.
Figure 1. Each scoped app lives inside its own namespace.

2 Scope names

A scope name looks like x_snwr_rooms:

Part Means
x_ A custom (not ServiceNow) app
snwr The company code (vendor prefix) set for your instance
rooms A short name for the app

Everything the app creates starts with that prefix. A table becomes x_snwr_rooms_booking. A script include’s API name becomes x_snwr_rooms.RoomUtils.

πŸ“ Note: ServiceNow’s own apps have scopes too, often starting with sn_, like sn_hr_core for HR Service Delivery.

3 Your current application

Just like the update set picker (Lesson 45.2), the header has an application picker. New files are created in the current application.

  • Open the picker (the globe icon) and choose the Application scope.
  • Building in the wrong scope is a common mistake. Check it before you start.
  • If you open a file from another scope, a banner tells you it’s read only in your current scope.

⚠️ Heads up: The Application field on a file can’t simply be changed later. Pick the right scope before you build.

⭐ Remember: Scope = a fence + a name prefix, like x_snwr_rooms. Check the application picker before you build.

4 Let’s try it: explore scopes

  1. Open the application picker in the header. Which application is current?
  2. Go to System Applications > My Company Applications. Are there any custom apps?
  3. Open System Definition > Tables and filter Name starts with x_. Which scoped tables exist?

5 Quick recap

  • Application scope groups and protects an app’s files
  • Scope names look like x_<company>_<app>
  • Everything in the app uses that prefix
  • New files go into the current application in the picker

6 Check yourself

Think of your answer first. Then tap to check.

1 What does the x_ at the start of a scope name mean? Show answer

It’s a custom app, not one made by ServiceNow.

2 In scope x_snwr_rooms, what would a table called “booking” be named? Show answer

x_snwr_rooms_booking.

3 Where do you choose the application you’re building in? Show answer

The application picker in the header.

Nice work! You finished this lesson. πŸŽ‰

Was this lesson helpful?

Have a question or doubt?

Ask here and get help from instructors and fellow learners.

0 / 300

Only logged-in learners can post.