skills/admin/application-scope/SKILL.md
Manage scoped application development including setting application context and update set alignment
npx skillsauth add happy-technologies-llc/happy-servicenow-skills application-scopeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Scoped application development in ServiceNow requires careful management of application context and update set alignment. This skill covers setting the current application scope, understanding scoped vs global considerations, and ensuring update sets are properly aligned with application development.
admin or application_creatoradmin/update-set-management (must understand update sets first)First, find the application you want to work in.
Using MCP tools:
Tool: SN-Query-Table
Parameters:
table_name: sys_app
query: scope!=global^active=true
fields: sys_id,name,scope,version,vendor
limit: 50
Expected Response:
{
"result": [
{
"sys_id": "abc123def456...",
"name": "My Custom Application",
"scope": "x_myco_custom_app",
"version": "1.0.0",
"vendor": "My Company"
}
]
}
Decision Points:
Set the application context for all subsequent operations.
Using MCP tools:
Tool: SN-Set-Current-Application
Parameters:
app_sys_id: abc123def456...
Important: This is an automated operation using the sys_trigger mechanism. It executes in approximately 1-2 seconds.
Verification:
Tool: SN-Query-Table
Parameters:
table_name: sys_user_preference
query: user=javascript:gs.getUserID()^name=apps.current_app
fields: value
Scoped applications should have their own update sets to maintain clean separation.
Query existing update sets for the application:
Tool: SN-Query-Table
Parameters:
table_name: sys_update_set
query: application=abc123def456...^state=in progress
fields: sys_id,name,state,application
limit: 10
Decision Points:
Create application-specific update set:
Tool: SN-Create-Record
Parameters:
table_name: sys_update_set
data:
name: "My Custom App - Feature Development v1.1"
application: abc123def456...
state: in progress
description: "Development update set for new features"
Align the update set with the application scope.
Using MCP tools:
Tool: SN-Set-Update-Set
Parameters:
update_set_sys_id: xyz789ghi012...
Verification:
Tool: SN-Get-Current-Update-Set
Parameters: (none required)
Expected Response:
{
"name": "My Custom App - Feature Development v1.1",
"sys_id": "xyz789ghi012...",
"state": "in progress",
"application": "abc123def456..."
}
Confirm both scope and update set are properly set before development.
Full verification query:
Tool: SN-Query-Table
Parameters:
table_name: sys_update_set
query: sys_id=xyz789ghi012...
fields: sys_id,name,application.name,application.scope
Alignment Checklist:
| Tool | Purpose |
|------|---------|
| SN-Set-Current-Application | Set active application scope |
| SN-Set-Update-Set | Set active update set |
| SN-Get-Current-Update-Set | Verify current update set |
| SN-Query-Table | Query applications and update sets |
| SN-Create-Record | Create new update sets |
| Endpoint | Method | Purpose |
|----------|--------|---------|
| /api/now/table/sys_app | GET | List applications |
| /api/now/table/sys_update_set | GET | List update sets |
| /api/now/table/sys_update_set | POST | Create update set |
Note: Setting current application via REST API requires background script execution or session manipulation, which is complex. MCP tools handle this automatically.
| Tool | Purpose |
|------|---------|
| Bash | Execute curl commands for REST operations |
| Read | Read application configuration files |
Use Scoped Applications When:
Use Global Scope When:
| Benefit | Description |
|---------|-------------|
| Namespace Isolation | Tables, scripts, and UI elements prefixed with scope (e.g., x_myco_app_*) |
| Upgrade Protection | Scoped artifacts are isolated from platform upgrades |
| Dependency Management | Clear dependencies between applications |
| Access Control | Application-level access restrictions |
| Portability | Easy export/import via update sets or store |
| Restriction | Impact | Workaround |
|-------------|--------|------------|
| Limited GlideRecord access | Cannot query all global tables by default | Request cross-scope access via Application Properties |
| Restricted APIs | Some GlideSystem APIs unavailable | Use allowed APIs or request elevation |
| UI limitations | Cannot modify global UI elements | Create scoped UI components |
| Script Include visibility | Must explicitly expose for cross-scope | Set accessible_from: all_application_scopes |
To allow a scoped application to access global or other scoped tables:
Tool: SN-Create-Record
Parameters:
table_name: sys_scope_privilege
data:
application: abc123def456...
table: incident
operation: read_write
status: allowed
{App Name} - {Feature/Sprint} - {Version} (e.g., "My App - User Portal v1.2")application field set to your scoped app's sys_idx_myco_*)Symptom: New records appear in Global scope instead of intended application Cause: Application scope not set before record creation Solution:
SN-Set-Current-ApplicationSymptom: Changes not appearing in update set Cause: Update set not aligned with application scope or update set not active Solution:
application field matches current scopeSymptom: SN-Set-Current-Application fails or has no effect
Cause: Insufficient permissions or application not found
Solution:
admin or application_creator roleSymptom: GlideRecord queries return no results or throw errors Cause: Scoped application lacks permission to access target table Solution:
GlideRecordSecure with elevated privilegesSymptom: Update set exists but linked to Global or different app Cause: Update set created before setting application scope Solution:
application field:Tool: SN-Update-Record
Parameters:
table_name: sys_update_set
sys_id: xyz789ghi012...
data:
application: abc123def456...
Complete setup for starting a scoped development session:
# Step 1: Find application
Tool: SN-Query-Table
Parameters:
table_name: sys_app
query: scope=x_myco_custom_app
fields: sys_id,name,scope
# Step 2: Set application scope
Tool: SN-Set-Current-Application
Parameters:
app_sys_id: abc123def456...
# Step 3: Find or create update set
Tool: SN-Query-Table
Parameters:
table_name: sys_update_set
query: application=abc123def456...^state=in progress
fields: sys_id,name
# Step 4: Set update set
Tool: SN-Set-Update-Set
Parameters:
update_set_sys_id: xyz789ghi012...
# Step 5: Verify setup
Tool: SN-Get-Current-Update-Set
Parameters: (none)
Create a properly aligned update set:
# Create update set linked to application
Tool: SN-Create-Record
Parameters:
table_name: sys_update_set
data:
name: "Customer Portal - Sprint 14"
application: abc123def456...
state: in progress
description: "Sprint 14 features: ticket submission, knowledge base search"
# Set as current
Tool: SN-Set-Update-Set
Parameters:
update_set_sys_id: [sys_id from above]
Create a new scoped application from scratch:
# Step 1: Create the application
Tool: SN-Create-Record
Parameters:
table_name: sys_app
data:
name: "My New Application"
scope: "x_myco_newapp"
version: "1.0.0"
vendor: "My Company"
short_description: "Application for managing custom workflows"
# Step 2: Set as current application
Tool: SN-Set-Current-Application
Parameters:
app_sys_id: [sys_id from above]
# Step 3: Create initial update set
Tool: SN-Create-Record
Parameters:
table_name: sys_update_set
data:
name: "My New Application - Initial Development"
application: [sys_id from step 1]
state: in progress
# Step 4: Set update set
Tool: SN-Set-Update-Set
Parameters:
update_set_sys_id: [sys_id from step 3]
Set scope on specific instance:
# Set application on dev instance
Tool: SN-Set-Current-Application
Parameters:
app_sys_id: abc123def456...
instance: dev
# Set update set on dev instance
Tool: SN-Set-Update-Set
Parameters:
update_set_sys_id: xyz789ghi012...
instance: dev
# Verify on dev instance
Tool: SN-Get-Current-Update-Set
Parameters:
instance: dev
Confirm records are being captured correctly:
# Create a test record
Tool: SN-Create-Record
Parameters:
table_name: sys_properties
data:
name: x_myco_app.test_property
value: test_value
type: string
# Verify capture in update set
Tool: SN-Query-Table
Parameters:
table_name: sys_update_xml
query: update_set=xyz789ghi012...^nameSTARTSWITHsys_properties
fields: sys_id,name,type,action
limit: 10
Full automation example combining scope and update set management:
# FULLY AUTOMATED SCOPED APP DEVELOPMENT (Zero Manual Steps!)
# 1. Query for existing application
Tool: SN-Query-Table
Parameters:
table_name: sys_app
query: scope=x_myco_custom_app
fields: sys_id,name,scope,version
# 2. Set as current application (automated via sys_trigger)
Tool: SN-Set-Current-Application
Parameters:
app_sys_id: abc123def456...
# 3. Find or create update set
Tool: SN-Query-Table
Parameters:
table_name: sys_update_set
query: application=abc123def456...^state=in progress
fields: sys_id,name
# 4. Set update set (automated via sys_trigger)
Tool: SN-Set-Update-Set
Parameters:
update_set_sys_id: xyz789ghi012...
# 5. Verify both are active
Tool: SN-Get-Current-Update-Set
Parameters: (none)
# 6. Begin development - create business rule
Tool: SN-Create-Record
Parameters:
table_name: sys_script
data:
name: Validate Custom Record
table: x_myco_custom_app_records
when: before
active: true
script: |
(function executeRule(current, previous) {
if (!current.name) {
gs.addErrorMessage('Name is required');
current.setAbortAction(true);
}
})(current, previous);
# 7. Verify capture
Tool: SN-Query-Table
Parameters:
table_name: sys_update_xml
query: update_set=xyz789ghi012...
fields: sys_id,type,name,action
admin/update-set-management - Managing update sets in detailadmin/instance-management - Switching instances for scoped developmentadmin/deployment-workflow - Deploying scoped applications across instancesadmin/batch-operations - Bulk operations within a scopetesting
Manage supplier onboarding, qualification, performance monitoring, and offboarding with auditable lifecycle controls
tools
Identify emerging risks, prioritize intake signals, and route candidates into formal GRC risk assessment workflows
documentation
Screen inbound documents for completeness, policy risk, and routing readiness before extraction or case workflows
testing
Generate concise task summaries with status, timeline, blockers, SLA risk, and recommended next actions