Problem Cancel action button, replicate it to incident.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2024 09:11 AM
State= Closed, Resolution code = Canceled (created that option) , and resolution notes/worknotes updated based on the input given on the canceled reason. (see attachment)
I already tried to code this based on what this ootb scripts:
UI script API name: ProblemModalUIHelpers
UI action name: Cancel
Can you please help me find a solution for this?
If you need more information please do not hesitate to ask.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2024 01:58 AM
Also, I have replaced the values for the code added to "ProblemModalUIHelpers".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2024 02:07 AM
Also tried to update the script in the UI action to:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2024 07:09 AM
If anyone has some insights on this I would appreciate it a lot, as I still didn't find a full solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2024 11:38 PM
Hi @Community Alums ,
There might be a lot to the code for ProblemModalUIHelpers as it is OOb. ServiceNow might have included codes in it which might not be accessible by us. Instead of replicating the same I found a workaround.
1.Create a new View and configure form layout to include only those fields you want to show in the pop-up
2.Write a UI action and call the view to show as a pop-up
UI Action script:
function testRecord() {
var sysID = g_form.getUniqueValue(); // sys_id of the record you want to show
var dialog = new GlideDialogForm('Testing modal', 'incident', finish);
dialog.setSysID(sysID); //Pass in sys_id to edit existing record,
dialog.addParm('sysparm_view', 'cancel_view_for_incident_pop_up'); //Specify a form view
dialog.setDialogHeight(600);
dialog.render();
function finish() {
//set something here
}
}
Adjust the code to Add mandatory or set values or other requirement you want to do
Please mark my answer correct/helpful if it resolved your query