Usecase for overall scripting in servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 10:17 PM
Hi ,
Anyone has usecases of scripting in servicenow, please share if have.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 10:28 PM
Hi Tanvisha,
You can refer below links.
https://www.servicenow.com/community/developer-forum/usecases/td-p/2566103
If my answer helped you in any way please mark it correct and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 10:38 PM
Hi @Tanvisha_1
Please refer the below links.
Client Script in ServiceNow With some use case. - ServiceNow Community
Business Rules (learnnowlab.com)
Can someone give requirements or use cases on clie... - ServiceNow Community
Thanks ,
Anitha H V
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 10:44 PM
Hi @Tanvisha_1 ,
Below is the Realtime industry requirements, that you can start with: -
1. Whenever caller Id is changes, email or User Id should populate as an alert.
2. Create an UI action which will create a child incident based on parent incident.
3. Create an UI action which will create 3 child tasks whenever request is created in 'sc_request' table.
Please accept this solution and mark this helpful, if it works for you.
For more Realtime use cases, you can reach out to me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 10:46 PM
Hi @Tanvisha_1 ,
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 :
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.
Thanks,
Astik