- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2023 05:47 AM
We are building out our instance with the new Tokyo Next Experience. We are using Agent Chat within the Service Operations Workspace. We are rolling out the next experience in phases. Trying to figure out if there is a way to redirect the Interaction UI Actions for "Create Incident" and "Create Request" in the native forms instead of the workspace forms. I have tried to add the below addendum to the script in various formats but can't seem to get it right. Any insight would be hugely appreciated!
function onClick(g_form) {
var sys_id = g_form.getUniqueValue();
open('/nav_to.do?uri=incident.do?sys_id=' + sys_id, '_self');
}
The current OOB Script is as follows:
var canCreateIncident = false;
if ((current.isNewRecord() && current.canCreate()) || (!current.isNewRecord() && current.canWrite()))
canCreateIncident = current.update();
else
canCreateIncident = true;
if (canCreateIncident) {
var inc = new GlideRecord("incident");
inc.initialize();
inc.caller_id = current.opened_for;
inc.short_description = current.short_description;
if (gs.getProperty("com.snc.incident.create_from_interaction.save") === 'true') {
inc.work_notes = gs.getMessage('Incident created from Interaction {0}', current.number);
var incSysId = inc.insert();
if (incSysId) {
var interactionRelatedGR = new GlideRecord("interaction_related_record");
interactionRelatedGR.initialize();
interactionRelatedGR.interaction = current.sys_id;
interactionRelatedGR.document_table = 'incident';
interactionRelatedGR.document_id = incSysId;
interactionRelatedGR.insert();
}
}
action.openGlideRecord(inc);
new InteractionRelationshipUtil().copyAttachments(current, inc);
}
Screen shot of the UI Action in question:
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2023 07:36 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2023 07:36 AM
Yes, that should working.
Here the example from "Continue problem"