Incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2025 06:48 AM
Create incident and along with short-description & description using script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2025 06:58 AM
Hi,
This is a simple example of the script.
var incGR = new GlideRecord('incident');
incGR.newRecord();
incGR.setValue('short_description', 'Some text for short description');
incGR.setValue('description', 'Some text for a longer description here...');
incGR.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2025 07:00 AM
so what did you start with and where are you stuck?
It's an easy requirement.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2025 07:24 AM
Hi @P1234,
You can create Incidents and set description and short description using server side script. Following is the code snippet:
var incidentGR = new GlideRecord('incident');
incidentGR.initialize();
incidentGR.setValue('short_description', 'ADD_YOUR_SHORT_DESCRIPTION');
incidentGR.setValue('description', 'ADD_YOUR_DESCRIPTION');
incidentGR.insert();
gs.info(incidentGR.sys_id);
Regards,
Ehab Pilloor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2025 07:54 AM
Hi @P1234
Try to keep it as low-code as possible.
You also didn’t mention how and from where you want to create the index.
Just writing one line won't help, mate. It’s actually quite simple—you can try it on your end as well.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************