Walk-Up experience - customizing "Create Incident"

Kim Sullivan
Tera Guru

Hi all -- I'd like to tweak the "Create Incident" UI action-- to set the assignee of the interaction as the assignee of the incident.  However, I can't seem to find the object creating the incident.

It is not part of the UI action, that's just a confirmation.

Anyone know what actually creates the incident?

1 ACCEPTED SOLUTION

Jonathan Ting
Tera Guru

Hi,

 

It's made up of 2 parts, first bit is the UI action "Create Incident", this is the button you see on the form. Once the button is click it will go to a UI page "incident_confirmation", this has the script for creating the Incident. In the processing script box you should see the code below, in bold is what you'll need to add to get the assignee in the incident.

// create the incident
var tableName = 'incident';
var gr = new GlideRecordSecure(tableName);
gr.initialize();

gr.contact_type = 'walk-in';
gr.short_description = current.short_description;
gr.caller_id = current.opened_for;
gr.sys_domain = current.sys_domain;
gr.sys_domain_path = current.sys_domain_path;
gr.assigned_to = current.assigned_to;

 

I would recommend you create a copy of the OOB UI action and UI page so it doesn't impact future upgrades.

 

Cheers,

JT

View solution in original post

4 REPLIES 4

sachin_namjoshi
Kilo Patron
Kilo Patron

Walk up experience is service portal implementation.

You need to customize widget to update logic in create incident code.

 

Regards,

Sachin

Community Alums
Not applicable

Hi Kim,

Did you every get a solution to this? I am trying to do the same.

Jonathan Ting
Tera Guru

Hi,

 

It's made up of 2 parts, first bit is the UI action "Create Incident", this is the button you see on the form. Once the button is click it will go to a UI page "incident_confirmation", this has the script for creating the Incident. In the processing script box you should see the code below, in bold is what you'll need to add to get the assignee in the incident.

// create the incident
var tableName = 'incident';
var gr = new GlideRecordSecure(tableName);
gr.initialize();

gr.contact_type = 'walk-in';
gr.short_description = current.short_description;
gr.caller_id = current.opened_for;
gr.sys_domain = current.sys_domain;
gr.sys_domain_path = current.sys_domain_path;
gr.assigned_to = current.assigned_to;

 

I would recommend you create a copy of the OOB UI action and UI page so it doesn't impact future upgrades.

 

Cheers,

JT

Thanks. QQ.  How do you create a safe, best-practice custom copy of a UI page when there is no active flag on UI Page?  

 

As per, https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0553407, "If a customization needs to be made here, you would own it and need to maintain it going forward."