Skip to tutorial content
Rate module Not yet rated

Global vs Scoped Apps

3 min read
On this page

In this lesson, you will learn:

  • The differences between global and scoped apps
  • How a scoped app controls access to its tables
  • How cross-scope access works

1 Global vs scoped

The Global scope is the big shared space. Most older customizations, like the u_ tables and fields you made, live there. Scoped apps live in their own namespace. 🏠

Global compared with scoped apps. Global: one shared space, custom names start with u_, anything can change anything, fine for small tweaks to existing apps. Scoped: its own namespace, names start with x_ plus the company code, other apps need permission to touch its data, easy to package, share, and move as one app. ServiceNow recommends scoped apps for new custom applications.
Figure 1. New custom apps should usually be scoped.
Global Scoped
Name prefix u_ x_snwr_rooms_
Protection Anything can change anything Other apps need permission
Script APIs Full set, including older ones A safer, “scoped” set (for example, use gs.info(), not gs.log())
Moving it Update sets Update sets, or as a whole app (source control, app repository)
Best for Small changes to existing apps, like Incident New custom applications

2 Protecting a scoped table

On a scoped table’s record, the Application Access section decides what other scopes can do:

  • Accessible from: This application scope only, or All application scopes.
  • Can read / Can create / Can update / Can delete: which operations other scopes may do.
  • Allow configuration: whether other scopes can add fields or business rules to it.
  • Allow access to this table via web services: whether integrations can reach it.

3 Cross-scope access

When a script in one scope uses something in another scope, like a table or a script include, that’s cross-scope access. ServiceNow records it in Cross scope privileges.

πŸ“ Note: Each app has a Runtime Access Tracking setting. Tracking allows the call and records it. Enforcing blocks calls that haven’t been approved in Cross scope privileges.

πŸ’‘ Good to know: ACLs still apply inside scoped apps. Scope decides which app can touch the data. ACLs decide which user can.

⭐ Remember: Global = shared, u_. Scoped = protected, x_. Scoped tables choose what other apps can do.

4 Let’s try it: check a table’s access

  1. Open System Definition > Tables. Find a table whose name starts with x_ or sn_.
  2. Open it and find the Application Access tab. What can other scopes do?
  3. Compare with your global u_room_booking table. Is there an Application Access section?

5 Quick recap

  • Global is one shared space. Scoped apps are protected
  • Scoped apps use safer scoped APIs
  • Application Access controls what other scopes can do with a table
  • Cross-scope calls are tracked, or enforced, in Cross scope privileges

6 Check yourself

Think of your answer first. Then tap to check.

1 You’re building a brand-new app for SNWR Facilities. Global or scoped? Show answer

Scoped.

2 Which table setting lets other scopes read a scoped table? Show answer

Accessible from: All application scopes, with Can read checked.

3 Scope decides which app can touch data. What decides which user can? Show answer

ACLs.

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.