Can someone give requirements or use cases on client scripts to improve my scripting skills.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2021 10:10 AM
Use cases on client scripts to improve my scripting skills.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2021 10:16 AM
Hi,
Refer to the course for learning
For practical scenario refer
Mark ✅ Correct/helpful, if applicable, Thanks!!
Aman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2021 10:16 AM
- To Improve scripting, try to solve more scenarios
- There are multiple scenario's , you can refer below examples
- When user opens the existing incident and there is the parent incident of the same incident then there should be a message at the top “this incident is child xxxx incident” and when user click on parent incident number, it should open the same incident in new tab.
- If the short description contain infra keyword in the beginning then category should add a new choice “INFRA” and set it to the same.
- There is a field on a form you applied client script to make that field invisible then apply UI policy to make it visible? What will be the output ?
- Create a business rule to Create a custom table(cust_incident) with two fields (incident_num, state), and whenever incident created, copy newly created incident associated incident_num, state values into the new custom table.
- Create a business rule, Whenever a record deleted from 'cust_incident' table, delete corrresponding incident record from 'incident' table
- OnChange: If Caller is VIP Then there should be an alert that caller is VIP and urgency should set to
High automatically - OnLoad Script : In Requested_for field, logged In user name autopopulate.
- OnCellEdit Script : Start Date and End Date validation
- OnSubmit : Start Date and End Date validation
- Before: If the Incident state is new then user should not able to delete that incident.
- Before: User should not be able to create new incident if the existing incident is there with same Short Description with Same Caller.
- After: When Problem resolves, then its related incidents should also resolve and copy the cause notes.
- Display: While Creating New Child Incident, Copy Fields From Parent Incident
- if there are multiple catalog items with same workflow but every time description field is getting changed so in run scrip
- activity how can we set it dynamically
- Write a script on incident, so when user select "caller" it will throw alert as “Mobile no of user is XXXXX”.when click on "ok", mobile no. get populated in short description of incident form
- OnChange Catalog Client Script if FirstName is Prasad and LastName is Dhumal, Email field should auto populate PDhumal@Gmail.com (First Letter of First Name + Lastname + @Gmail.com)
- Calculate the number and return as duration : User will be entering the number on the form for example lets say 250,
- based on the input it should convert this number into a time duration as 4 hours and 10 minutes.
You will find some scenario based challenges here : Are YOU a ServiceNow Jedi? - ServiceNow Guru
Also don't forget to check below links
Glide Record Scripting :https://www.shalamaster.com/GLIDERECORD.html
Glide Aggregate Scripting : https://www.shalamaster.com/GLIDEAGGREGATE.html
Client Script : https://www.shalamaster.com/CLIENT_SCRIPT.html
Incident-Problem-Change : https://www.shalamaster.com/IPC.html
Advance Client Script : https://www.shalamaster.com/Advance_ClientScript.html
Also don't forget to check this article by Ajim :
Please mark my reply as Helpful so that others can also benefit.
Regards
Prasad Dhumal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2021 10:34 PM
are you looking for more into this?, if these scenario satisfied your Question,
I would really appreciate if you can close this thread by marking appropriate response as correct and other responses as helpful.
This helps in removing this thread from unanswered list.
-Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2021 07:57 PM
I am looking for few more requirements and then I will close this thread.