Introduction
Client script runs on client side (Browser).We can write simple Java script to meet our client side requirements.
Client Script will execute in four ways
- On CellEdit: Runs when a cell on a list changes value
- On Load: Runs when a form is loaded
- On Change: Runs when a particular filed changes value
- On Submit: Runs when a form is submitted
Procedure to create client script
- In the left navigation pane under System Definition we will find the client script
- Below is the table where we can find all client scripts.
- Click on new button to create Client script
- There are 4 types of client script
- onCellEdit
- onChange
- onLoad
- onSubmit
- Action gets triggerd based on this 4 types of events.
OnLoad
If we select the onLoad then when the page will load, the client script will run.
OnChange
OnSubmit
onCellEdit
It is used in list view. Cell mean a particular row inside a column. Like a excel cell.
In list view in service now we will get the value as a tabular form so here one value is like cell value.So here if we want to modify any value and trigger a client script then we can use onCellEdit.
Example:
In the problem table we have Configuration Item Filed. Here when we select any CI in the field then automatically support group of the CI is populated in the assignment group in the problem table.
For that we need onchange Client script as when we select the CI name then only assignment group is filled with CI support group. So we need to create a onchange client script
If We want to create a client script of problem table then
Right click on the form of
problem table> configure> client script
Click new button to create a client script
- Understanding Request, RITM, Task in ServiceNow
- Steps to create a case in ServiceNow (CSM)
- Performance Analytics in 10 mins
- Event Management in 10 minutes - part1
- Event Management in 10 minutes - part2
- Custom Lookup List
- Script includes in 5 minutes
- Interactive Filter in 5 minutes
- UI Policy in 6 Minutes
- Client Side Script Versus Server Side Script in 3 minutes
-
Snow
- Performance Analytics
- ServiceNow Scripts
- Script include
- Useful scripts
- Basic Glide Scripts
- Client Script
- Advance Glide Script
- Glide System Script
- Admin
- Import Set
- Work Flow
- ACL
- SLA
- Notification
- Core Application
- UI Policy
- UI Action
- Client Script
- CAB Workbech
- Data Policy
- Connect Support
- Catalog
- Discovery
- CSM
- Event Management
- HR
- Integrations
- SSO Integration
- LDAP Integration
- SCCM Integration
- AWS Intergration
- Slack Integration
- CTI Integration
- Jira Integration
- Ebonding ServiceNow
- SOAP Integration
- IBM Netcool Integration
- VIP Mobile App Integration
- Rest Integration
- Service Portal
- Questions
- ACL
- Performance analytics(PA) Interactive Filter
- Various Configurations in Performance analytics(PA)
- Service Portal
- Performance Analytics(PA) Widgets
- Performance Analytics(PA) Indicator
- Performance Analytics(PA) Buckets
- Performance Analytics(PA) Automated Breakdown
- Client Script
- Rest Integration
- Understanding the Request, RITM, Task
- Service Catalogs
- Events in ServiceNow
- Advance glide script in ServiceNow
- CAB Workbench
Comments