Dialog box not showing when clicking UI action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2024 07:06 AM
I have a requirement to create a "Feedback" option on the incident table. I've created a Feedback UI action, that in theory should generate a dialog box, and when the box is closed / submitted, it should save the feedback to a different table, linked to the Incident table via a reference field.
The problem is, nothing happens at all. The Dialog box doesn't open, it's as if nothing happens at all.
//
function onClick(g_form) {
var incidentSysID = g_form.getUniqueValue();
var incidentNumber = g_form.getValue('number');
var dialog = new GlideDialogWindow('text_popup', false);
dialog.setTitle('Please provide feedback');
dialog.setPreference('table', 'u_incident_feedback_table');
dialog.setPreference('sysparm_sysID', incidentSysID);
dialog.setPreference('sysparm_number', incidentNumber);
dialog.render();
}
function onComplete(feedback) {
var dialog = GlideDialogWindow.get();
dialog.destroy();
var g_form = new GlideForm();
g_form.addInfoMessage('Thanks for the feedback');
}
I've included my settings and the script I'm using. Any assistance would be greatly appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2024 07:41 AM - edited 11-11-2024 07:43 AM
Seems 'GlideDialogWindow' is deprecated in Washingtondc release.
which states: This API has been deprecated, use the GlideModalV3 API instead
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2024 08:02 AM
Hi @Venjamin ,
Just change GlideModel() from GlideDialogWindow(). Rest will work as it is.
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------