
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2021 10:11 AM
Our initial vendor gave us a UI action to mark incidents as duplicate. Below is the code and they are using GlideDialogForm and GlideDialogWindow. I noticed that the dialog box that opens to select an incident that the current incident is a duplicate of has a delete button. This appears for users who do not have delete wrights on the incident table and allows them to delete the record. Is there a way around this? I did not find any documentation on GlideDialogForm.
function showMyForm() {
var con = confirm("Do you really want to mark this Incident Duplicate ?");
if (con == true) {
//Get the table name and sys_id of the record
var tableName = g_form.getTableName();
var sysid = g_form.getUniqueValue();
//Create and open the dialog form
var dialog = new GlideDialogForm('Select the parent Incident', tableName); //Provide dialog title and table name
// dialog.setSysID(sysID); //Pass in sys_id to edit existing record, -1 to create new record
// dialog.addParm('sysparm_view', 'Default view'); //Specify a form view
// dialog.addParm('sysparm_form_only', 'true'); //Add or remove related lists
// dialog.render(); //Open the dialog
//Title for the browser window not the ui page title
var gdw = new GlideDialogWindow('Mark Duplicate Page');
gdw.setTitle('Select the parent Incident');
gdw.setSize(750, 300); //Size of the popup window
// gdw.addParm('sysparm_view', 'default');
gdw.setPreference('sysid', sysid);
gdw.render();
} else
return false;
}
Solved! Go to Solution.
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2021 10:23 AM
Hi,
From my understanding, GlideDialogForm and GlideModalForm are ways to display a database record in it's entirety (not a UI Page with specific display elements, etc.), whereas GlideDialogWindow and GlideModal is used to interact in a smaller capacity (with the GlideModal API replacing GlideDialog) as in a UI Page that's called.
So, with that said, I don't think GlideDialogForm should have been used at all in your scenario.
It is interesting to hear that they have access to "Delete", although I'm unsure how extensively you tested this to verify, etc., but either way, you may have to re-write this to use GlideModal.
Some "documentation" here for GlideDialogForm: https://snprotips.com/undocumented-servicenow-apis (scroll down some to see it).
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2021 02:08 PM
Ugh 😞
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!