ServiceNow Custom Application Development & Configurations
Categories:
ServiceNow Item/Form Development
Description
ServiceNow Custom Application Development & Configurations
This guide provides a structured overview of the custom application development lifecycle, the core components, and critical configuration best practices within the ServiceNow platform.
1. The Custom Application Development Lifecycle (Agile Approach)
The development process on ServiceNow generally follows an Agile/iterative approach, focusing on delivering value quickly and gathering continuous feedback.
| Phase | Description | Key Activities & Tools |
| 1. Ideation & Planning | Define the problem, scope, and business value. Ensure the app is needed and not available out-of-the-box. | Identify Use Case, Define MVP Scope, Data Modeling (Identify Tables and Relationships), Define Roles & Security (ACLs). |
| 2. Design & Prototyping | Architect the data model and design the user experience. Focus on process flow. | Create Application in Studio/App Engine Studio, Sketch UI/UX (Forms, Lists, Workspaces, Portals), Define Workflows (Flow Designer/Workflows). |
| 3. Development & Build | Implement the core functionality using platform tools and code. | Create Tables & Fields, Configure Forms & Views, Implement Business Logic (Business Rules, Script Includes, Client Scripts), Build Workflows (Flow Designer), Configure UI (Service Portal, UI Builder, Agent Workspace). |
| 4. Testing & QA | Validate that the application meets requirements, is secure, and performs well. | Unit Testing, Integration Testing, User Acceptance Testing (UAT), Security Testing (ACLs), Performance Testing, Automated Test Framework (ATF) setup. |
| 5. Deployment & Release | Migrate the application and data between environments (Dev, Test, Prod). | Publish Application to Repository/Store, Apply Update Sets (for configurations outside of the scoped app), Run Fix Scripts (for data migration), Configure Access Controls in Production. |
| 6. Maintenance & Improvement | Monitor performance, address defects, and implement enhancements based on user feedback. | Monitor Performance, Collect Feedback, Version Control (for updates), Maintain Documentation. |
2. Core Building Blocks (The “What” to Configure)
Every custom application is built from a collection of interconnected ServiceNow components.
2.1. Data Layer (Tables)
- Tables: The fundamental structure for storing data.
- Best Practice: Always extend a base table (e.g.,
task,cmdb_ci) if the custom table shares common characteristics, ensuring inheritance of standard fields and platform functionality (e.g., approvals, SLAs). - Fields: Use the most appropriate data type (e.g.,
Referencefields for linking to other tables,Choicelists for defined options).
2.2. User Interface (Forms, Lists, Portals)
- Forms: The view for single records. Configured using Form Designer or Form Layout.
- Configuration: Use UI Policies (low-code) and Client Scripts (pro-code) to control visibility and behavior (e.g., making a field mandatory based on another field’s value).
- Lists: Display multiple records. Configured using List Layout.
- Experiences:
- Now Experience UI Builder: Low-code tool for building modern, mobile-responsive workspaces and portals.
- Service Portal: (Legacy) For building customer/employee-facing self-service portals using Widgets (HTML, CSS, Angular/Server Script).
2.3. Business Logic & Automation (Scripting & Flows)
- Business Rules (Server-side): Execute logic on the server (before/after database actions).
- Configuration: Must be scoped to the application. Use sparingly and efficiently.
- Script Includes (Server-side): Reusable JavaScript functions, often called from Business Rules, Workflows, or Client Scripts (via GlideAjax).
- Best Practice: Centralize complex business logic here to promote reusability and maintainability.
- Flow Designer / Workflows: Automate multi-step business processes. Flow Designer is the preferred modern tool.
- Configuration: Used for approvals, task creation, notifications, and integrations (using IntegrationHub).
2.4. Security (Access Control)
- Roles: Define the user’s function and permissions. Custom applications should always define their own specific roles (e.g.,
x_app_manager,x_app_user). - Access Control Lists (ACLs): Define what data a user can access (
read,write,create,delete) and under what conditions. - Best Practice: Define security at the most restrictive level (Table > Field, Row > Column) and then grant permissions.
3. Essential Configuration Best Practices
3.1. Scoped Application Development (Mandatory)
- Scope: Always develop in a Scoped Application. This provides a unique namespace (e.g.,
x_12345_myapp), preventing naming collisions and protecting your application’s components from external changes, greatly simplifying future upgrades. - System Properties: Use System Properties (
sys_properties) to store configuration values (like API keys, threshold limits, or default user IDs) instead of hardcoding them in scripts.
3.2. Performance & Efficiency
- Avoid Client-side Code: Minimize the use of Client Scripts as they impact form load time. Prefer UI Policies or server-side alternatives where possible.
- Efficient GlideRecord: When scripting:
- Avoid using
addQuery()on non-indexed fields. - Use
get(sys_id)for single record retrieval. - Avoid complex queries or unnecessary lookups inside loops.
- Asynchronous Operations: Use Asynchronous Business Rules or Flow Designer to handle long-running or non-critical processes to prevent users from waiting.
3.3. Deployment & Migration
- Use the Application Repository: For moving scoped applications between instances (Dev to Test to Prod), always publish the application to the Application Repository. This provides version control and simplifies the deployment process compared to using Update Sets.
- Update Sets: Only use Update Sets for records that reside outside the application scope, such as:
- New users or groups.
- Modifications to global records (e.g., global UI Scripts).
- Data records (if not handled by Fix Scripts).
3.4. Code Quality
- Instance Scan: Run the Instance Scan tool regularly to identify common development issues, performance bottlenecks, and adherence to best practices.
- Comments & Documentation: Document all scripts (Client Scripts, Business Rules, Script Includes) clearly, explaining the why (purpose) and how (logic) of the code.
Summary of Key Configurations
| Component | Configuration Method | Purpose |
| Data Structure | Tables & Schema Map | Defines the database schema and relationships. |
| Security | Roles & ACLs | Defines who can access what (data & functions). |
| Form Logic | UI Policies & Client Scripts | Controls form behavior and user experience. |
| Server Logic | Business Rules & Script Includes | Executes server-side processing for data manipulation and complex logic. |
| Automation | Flow Designer | Automates multi-step processes (approvals, tasks, notifications, integrations). |
| External Values | System Properties | Stores configurable parameters outside of code. |

Shrabani Muli
Good To Use This Service….
Thank You! SYSNOW