Adding extra parameter (field) in create incident topic block

Suresh Kumar8
Tera Contributor

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.

15 REPLIES 15

Hello @Ankur Bawiskar , are you asking about the script include or the topic block?

@Suresh Kumar8 

the OOB script include "VACreateINCUtil" is read-only so you can't edit that.

 

AnkurBawiskar_0-1743509549353.png

 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar , I tried this code in topic block, but still the mapping is not happening. Attached screenshot.

@Suresh Kumar8 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar , the value is coming as empty