- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
In Employee center after an incident is resolved, the caller is given two buttons to either close the incident or reopen it.
But, if the caller clicks on close button accidently it will be permanently closed.
We want to give a prompt to user when they click on the close button as a warning so that after that only a user will close the incident.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
You will want to create a new UI action and disable the existing one. Here are some screen shots of the one I created in my PDI that worked for both the workspace and client.
Here's the code for the script:
function IncComplete() {
var dialogClass = window.GlideModal ? GlideModal : GlideDialogWindow;
var dialog = new dialogClass('glide_confirm_basic');
dialog.setTitle(new GwtMessage().getMessage('Confirmation'));
dialog.setPreference('title', new GwtMessage().getMessage("Are you sure you want to close this ticket?"));
dialog.setPreference('onPromptComplete', SNcompleteCallbackFunction);
dialog.render();
}
function SNcompleteCallbackFunction() {
gsftSubmit(null, g_form.getFormElement(), 'close_incident');
}
current.incident_state = IncidentState.CLOSED;
current.state = IncidentState.CLOSED;
current.update();
gs.addInfoMessage("Incident completed.");
Here's the code for the Workspace Script:
function onClick(g_form) {
var title = getMessage('Confirmation');
var message = getMessage("Are you sure you want to close this ticket?");
g_modal.confirm(title, message).then(
function onSuccess() {
g_form.submit('close_incident');
}
);
return false;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
This was solved with the help of @JenniferRah and Gemini in native view and Service Operation Workspace.
In employee center, It was done by going to standard ticket confirguration.
In the incident ticket configuration, in standard ticket actions tab, ther is a close record i deactivated that and create a copy of that named'Close Permanently'.
In Close permanently I marked User input as true and saved it.
below a related list appeared,' standard ticket action inputs.
i created a record in that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
why to have this much customization?
You can train your end users about this
If you still want then you need to clone the OOTB widget, make changes to it and then add that widget again to your portal page
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
This was solved with the help of @JenniferRah and Gemini in native view and Service Operation Workspace.
In employee center, It was done by going to standard ticket confirguration.
In the incident ticket configuration, in standard ticket actions tab, ther is a close record i deactivated that and create a copy of that named'Close Permanently'.
In Close permanently I marked User input as true and saved it.
below a related list appeared,' standard ticket action inputs.
i created a record in that