Lessons › Domain 1: Designing and Creating an Application (20%) › Lesson 4
Application Scope
About 14 minutes · Last checked against the CAD blueprint (January 2026): 4 December 2026
Step 1 · Learn
Keeping an application's files together and protected
Every application file, such as a table, script or module, belongs to an application scope. The scope groups the files, gives them a unique namespace and protects them from other applications.
Scoped and global applications
- A scoped application has its own namespace, such as
x_acme_loans. Its files are protected, and other applications can only use them as the scope allows. - A global application lives in the global scope. It groups related global files so they can be managed and moved together, but it has no protected namespace.
The namespace
The namespace is made of x_, the instance's vendor prefix and the application's short name. Tables, script includes, properties and events in the scope all use it, which prevents name clashes with other applications.
Working in the right scope
You create and edit an application's files while that application is selected as the current scope, for example in ServiceNow Studio or with the application picker. Files created in the wrong scope belong to the wrong application.
Rules to know
- You cannot move files into or out of a scoped application afterwards.
- You cannot change the scope of an application, or remove it.
- For a global application, you can add files from the global scope to it.
- Scoped scripts run in a protected environment: some global APIs are not available, and logging uses
gs.info(),gs.warn(),gs.error()andgs.debug()rather thangs.log().
Step 2 · Do
Work in the right scope
A colleague has been creating files for the loans application. Check what is allowed. This is a practice environment of our own design, not the ServiceNow product. Complete the tasks in the task list.
Step 3 · Check
Exam-style questions
Select an answer and check it. Every answer includes an explanation.