Resolve button popup
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
In native ui and SOW I am getting the popup but not in CSM workspace.
function resolveIncident() {
var configFields = {
resolution_notes: getConfigField('resolution_notes'),
resolution_code: getConfigField('resolution_code')
};
if (noGenAIResolve() || !hasConfigFields(configFields) || g_form.isNewRecord()) {
g_form.setValue('incident_state', 6);
g_form.setValue('state', 6);
g_form.setValue('resolved_by', g_user.userID);
var sysverb = g_form.isNewRecord() ? 'sysverb_insert' : 'sysverb_update';
gsftSubmit(null, g_form.getFormElement(), sysverb);
return;
}
var formValues = {};
formValues[configFields.resolution_code] = g_form.getValue(configFields.resolution_code);
formValues[configFields.resolution_notes] = g_form.getValue(configFields.resolution_notes);
g_scratchpad.originalState = g_form.getValue('state');
g_scratchpad.setValueMap = {
incident_state: 6,
state: 6,
resolved_by: g_user.userID
};
var title = getMessage('Resolve');
ScriptLoader.getScripts("sn_itsm_gen_ai.GenAIModalHelpers.jsdbx", function() {
new sn_itsm_gen_ai.GenAIModalHelpers.openModal('ui16_incident_resolve_modal', title, '', formValues);
});
}
function getConfigField(field) {
if (!g_scratchpad.resolutionSkillConfig)
return '';
return g_scratchpad.resolutionSkillConfig[field] ? g_scratchpad.resolutionSkillConfig[field] : '';
}
function noGenAIResolve() {
var roles = g_user.roles;
if (Array.isArray(roles))
return !(roles.indexOf('itil') >=0 || roles.indexOf('sn_incident_write') >=0 || roles.indexOf('admin') >= 0 || roles.indexOf('itil_admin') >=0);
return true;
}
function hasConfigFields(config) {
if (!config.resolution_notes && !config.resolution_code)
return false;
return (!config.resolution_notes || g_form.hasField(config.resolution_notes)) && (!config.resolution_code || g_form.hasField(config.resolution_code));
}
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
I will suggest train your agents to use SOW as it's used for incidents and CSM workspace is mostly to work on cases
if you still want then check below
Enabling SOW Actions in CSM/FSM Configurable Workspace
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Regards,
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader