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 04:50 AM
Hello @Suresh Kumar8,
Issue is that createIncident function is not taking parameter "impact". After collecting user inputs. Please try below script:
var incident = new GlideRecord('incident');
incident.initialize();
incident.caller_id = vaInputs.caller;
incident.sys_created_by = vaInputs.user;
incident.short_description = vaInputs.short_description;
incident.assignment_group = vaInputs.assigment_group;
incident.cmdb_ci = vaInputs.cmdb_ci;
incident.urgency = vaInputs.urgency;
incident.impact = vaInputs.impact;
incident.contact_type = 'virtual_agent';
incident.comments = vaInputs.comments;
incident.incident_state = vaInputs.state;
//Save this incident as a variable to use to display it
vaVars.incident = incident.insert();
//Link this incident to the Interaction
vaSystem.attachRecordToConversation('incident',vaVars.incident);
You would have incident virtual agent variable holding the sys_id of the created incident to use/display it.
If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 05:33 AM
Hello @Medi C , Do you want me to add this in the script include?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 06:19 AM
You can use the script on the VA topic instead of
new sn_itsm_va.VACreateINCUtil().createIncident(caller, short_desc, urgency, desc, cmdb_ci, impact);
If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 05:02 AM
did you also update that function to accept the impact and add the line to set the impact?
share that
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