- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2026 07:50 PM
Hi @RyoyaFukuda
Try with this UI Action :
- Action name: resolve_incident (must be unique)
- Client: true
- Onclick: resolveINCClient()
- Workspace Form Button: true (Checked)
- Format for Configurable Workspace: true (Checked)
Sample code/Not tested
function resolveINCClient () {
var closeNotes = g_form.getValue('close_notes');
if (closeNotes == '' || closeNotes == null) {
g_form.showFieldMsg('close_notes', 'Please enter a Resolution Note before resolving.', 'error');
return false;
}
try {
g_modal.confirm('Confirm Resolution', 'Are you sure you want to resolve this Incident?', function(confirmed) {
if (confirmed) {
gsftSubmit(null, g_form.getFormElement(), 'resolve_incident');
}
});
} catch (e) {
if (confirm('Are you sure you want to resolve this Incident?')) {
gsftSubmit(null, g_form.getFormElement(), 'resolve_incident');
}
}
}
if (typeof window == 'undefined') {
serverResolve();
}
function serverResolve() {
current.incident_state = 6;
current.state = 6;
current.update();
action.setRedirectURL(current);
}
Refer: How to use UI Actions in Workspaces
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti