Adding extra parameter (field) in create incident topic block
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 04:29 AM
Hello Developers,
I have a requirement in adding and mapping a new parameter (IMPACT) into Create Incident topic block. I followed the below steps:
1. Duplicated the Create Incident topic block.
2. Added new parameter called impact.
3. Mapped as below in the script provided in topic block:
var incDetails - new sn_itsm_va.VACreateINCUtil().createIncident(caller, short_desc, urgency, desc, cmdb_ci, impact);
4. Added my newly created topic block to Create Incident topic.
Mapping is not working.
I have attached screenshots for the same. Request your valuable inputs on this please.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 05:07 AM
Hello @Ankur Bawiskar , are you asking about the script include or the topic block?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 05:11 AM - edited 04-01-2025 05:12 AM
the OOB script include "VACreateINCUtil" is read-only so you can't edit that.
Do this
1) the script include returns GlideRecord object of INC record
2) in the VA topic script add these 2 lines after line 10 so that it updates the INC after creation
incDetails.impact = impact;
incDetails.update();
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 05:34 AM
@Ankur Bawiskar , I tried this code in topic block, but still the mapping is not happening. Attached screenshot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 05:37 AM
did you add log and see what value came in impact?
If value is garbage then it won't set as impact field on INC is choice type
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 07:05 AM
@Ankur Bawiskar , the value is coming as empty