From Zero to Hero: Building a Custom ServiceNow Application (No Code Required!)
So, youâve heard about ServiceNow and its powerful application development capabilities, but the thought of coding sends shivers down your spine? Fear not! You can build robust and useful applications within ServiceNow without writing a single line of code. This guide will walk you through the entire process, from understanding the basics to building your first custom application using ServiceNowâs low-code/no-code tools.
What is ServiceNow and Why Build an Application?
ServiceNow is a cloud-based platform designed for digital workflows. Itâs used by organizations to manage IT services, HR processes, customer service, and much more. Building a custom application within ServiceNow allows you to:
- Automate specific workflows: Streamline repetitive tasks and processes unique to your organization.
- Improve efficiency: Reduce manual effort and data entry, freeing up your team to focus on more strategic activities.
- Centralize data: Keep all your information in one place, making it easier to access and manage.
- Enhance user experience: Create intuitive and user-friendly interfaces for your specific needs.
Understanding the Key Components
Before we jump into building, letâs familiarize ourselves with the core components youâll be working with:
- Application Navigator: The left-hand menu in ServiceNow. Itâs your portal to accessing applications, modules, and other features.
- Studio: The primary development environment in ServiceNow. It provides a visual interface for creating and customizing applications.
- Tables: Databases that store data in a structured format. Think of them as spreadsheets with rows (records) and columns (fields).
- Fields: The columns within a table that define the type of data stored (e.g., text, number, date, choice list).
- Forms: Interfaces used to display, create, and edit records in a table.
- Lists: Displays of multiple records from a table in a tabular format.
- Workflows: Automated processes that define a sequence of actions to be performed.
- Flow Designer: The no-code tool for creating and managing workflows.
- Roles: Define access permissions to applications and data.
Getting Started: Creating Your First Application
Letâs create a simple application for managing employee suggestions.
- Log in to ServiceNow: Access your ServiceNow instance using your credentials.
- Navigate to Studio: In the Application Navigator, type âStudioâ and click on it.
- Create a New Application:
- Click on the âCreate Applicationâ button.
- Enter the Application name:
Employee Suggestions
- Enter a Scope Name:
x_yourcompany_employee_suggestions
(Replaceyourcompany
with your actual company name or a unique identifier). The scope ensures your application doesnât conflict with other applications. - Click âCreate.â
Creating a Table
Now, we need to create a table to store the employee suggestions.
- In Studio, click âCreate Newâ and select âTableâ.
- Configure the Table:
- Label:
Suggestion
- Name:
x_yourcompany_employee_suggestion
(This will be automatically populated based on the scope and label). - Extends Table: Leave this as
Task
if you want the features of task management. Otherwise, selectNone
. Extending the âTaskâ table gives your new table built-in workflow capabilities, assignment groups, and other task-related features. For our example, leave it asTask
. - Create Module: Check this box to create a module in the Application Navigator for easy access to the table.
- Label:
- Click âSubmitâ.
Defining Fields
Letâs add some fields to our Suggestion
table:
-
In Studio, navigate to your newly created âSuggestionâ table.
-
Add the following fields by clicking on âCreate Newâ and selecting âColumnâ:
- Column Label:
Submitted By
- Column name:
u_submitted_by
- Type:
Reference
- Reference table:
User [sys_user]
(This will allow you to select a user from the ServiceNow user database).
- Column name:
- Column Label:
Suggestion Category
- Column name:
u_suggestion_category
- Type:
Choice List
- Choices:
- Label:
Process Improvement
, Value:process_improvement
- Label:
Product Enhancement
, Value:product_enhancement
- Label:
Workplace Environment
, Value:workplace_environment
- Label:
- Column name:
- Column Label:
Suggestion Description
- Column name:
u_suggestion_description
- Type:
String (max_length: 4000)
- Column name:
- Column Label:
-
Click âUpdateâ after adding each field.
Customizing the Form Layout
The form layout controls how the fields are displayed when creating or viewing a suggestion record.
-
In Studio, navigate to your âSuggestionâ table.
-
Click on the âForm Layoutâ link (or right-click the table name and select âConfigureâ -> âForm Layoutâ).
-
Arrange the fields: Drag and drop the fields from the âAvailableâ slushbucket to the desired position in the form. For example:
- Number
- State
- Assigned to
- Assignment Group
- Submitted By
- Suggestion Category
- Suggestion Description
-
Add Sections: Add a new section. To do this, click âCreate Sectionâ at the top. Name the section âSuggestion Detailsâ. Then, drag âSubmitted Byâ, âSuggestion Categoryâ, and âSuggestion Descriptionâ into that section. This will visually organize the form.
-
Click âSaveâ.
Creating a Module in Application Navigator
This step might have been automatically done when creating the table if you selected the checkbox, but verify.
-
In Studio, right-click on the âSuggestionâ table and select âCreate Newâ then select âModuleâ.
-
Configure the Module:
- Title:
Create New Suggestion
- Application Menu: Employee Suggestions
- Order:
100
(Determines the position in the menu) - Link Type:
New Record
- Table:
Suggestion [x_yourcompany_employee_suggestion]
- Title:
-
Create another module with the following:
- Title:
All Suggestions
- Application Menu: Employee Suggestions
- Order:
200
- Link Type:
List of Records
- Table:
Suggestion [x_yourcompany_employee_suggestion]
- View:
Default View
- Title:
-
Click âSubmitâ.
Securing Your Application with Roles
Roles control who can access and use your application. Letâs create a simple role for suggesting employees.
-
In Studio, click âCreate Newâ and select âAccess Controlâ.
-
Configure the Access Control:
- Operation:
create
- Permission:
requires_role
- Role:
x_yourcompany_employee_suggestions.suggesting_employee
(Weâll create this role next) - Record:
Suggestion [x_yourcompany_employee_suggestion]
(leave it as this)
- Operation:
-
Click âSubmitâ.
-
Repeat the process for the
read
operation (to allow users to view suggestions they created) on the âSuggestionâ table, using the same role. Make sure âAdmin Overridesâ is checked. -
Create the Role: In the Application Navigator, search for âRolesâ. Click on âRolesâ under the âUser Administrationâ application.
-
Click âNewâ.
-
Name:
x_yourcompany_employee_suggestions.suggesting_employee
-
Application: Employee Suggestions
-
Click âSubmitâ.
Now, only users with the âx_yourcompany_employee_suggestions.suggesting_employeeâ role will be able to create and view suggestions. You can assign this role to users by navigating to âUser Administrationâ -> âUsersâ and adding the role to the userâs record.
Creating a Workflow with Flow Designer
Letâs automate the process of notifying the assigned group when a new suggestion is created.
- In the Application Navigator, type âFlow Designerâ and click on it.
- Click âNewâ and select âFlowâ.
- Configure the Flow:
- Name:
New Suggestion Notification
- Application:
Employee Suggestions
- Run As:
User who initiates session
- Click âSubmitâ.
- Name:
- Add a Trigger:
- Click âAdd Triggerâ.
- Select âRecord Createdâ.
- Table:
Suggestion [x_yourcompany_employee_suggestion]
- Add an Action:
- Click âAdd Actionâ.
- Select âSend Emailâ.
- To:
${trigger.current.assignment_group.manager.email}
(This will send the email to the manager of the assigned group.) - Subject:
New Suggestion: ${trigger.current.number}
- Body:
A new suggestion has been submitted: ${trigger.current.u_suggestion_description}\n\nView it here: ${trigger.current.getLink()}
- Activate the Flow: Click the âActivateâ button in the top right corner.
Now, whenever a new suggestion is created, the manager of the assigned group will receive an email notification.
Testing Your Application
- Assign the
x_yourcompany_employee_suggestions.suggesting_employee
role to your user account. - Navigate to the âEmployee Suggestionsâ application in the Application Navigator.
- Click on âCreate New Suggestionâ.
- Fill in the form with your suggestion details.
- Save the record.
- Verify that the record is created and that the email notification is sent to the appropriate user.
Conclusion
Congratulations! Youâve successfully built a custom ServiceNow application without writing any code. Youâve learned how to:
- Create a new application and table.
- Define fields and customize the form layout.
- Create modules for easy navigation.
- Implement security using roles.
- Automate processes with Flow Designer.
This is just the beginning! ServiceNow offers a wealth of features and capabilities for building even more complex and sophisticated applications. Explore the platform, experiment with different tools, and continue learning to become a ServiceNow application development expert.