Gilde Dialogue window - ok button not working

KARAN24
Tera Contributor

Hi Team,

Need help in one of the issue.

when we cancel a case and click on "ok" after entering reason for cancellation - pop up window is not vanishing. We need to click elsewhere in order for it to vanish - state is  getting updated though .

find_real_file.png

Here is my UI Action.

function cancelCase() {
var sysId = typeof rowSysId == 'undefined' || rowSysId == null ?
g_form.getUniqueValue() : rowSysId;
var dialogClass = GlideModal ? GlideModal : GlideDialogWindow;
var dialog = new dialogClass('sn_hr_core_HR Comment Dialog');
var msg = new GwtMessage().getMessage('Enter the reason for canceling the case');
dialog.setTitle(msg);
dialog.setPreference('sysparm_task_sys_id', sysId);
dialog.setPreference('sysparm_task_table', 'sn_hr_core_case');
dialog.setPreference('sysparm_ok_method_name', 'cancelCase');
dialog.setPreference('sysparm_is_required', false);
dialog.setPreference('sysparm_is_comment', 'false');
dialog.render();
}

 

Thanks,

Karan

5 REPLIES 5

Susan Britt
Mega Sage
Mega Sage

Can you attach a screenshot of the entire UI Action?  My OOB on San Diego looks like the below, and I do not have any issues with it - even with different browsers.

function cancelCase() {
        var sysId = typeof rowSysId == 'undefined' || rowSysId == null ?
                g_form.getUniqueValue() : rowSysId;
        var dialogClass = GlideModal ? GlideModal : GlideDialogWindow;
        var dialog = new dialogClass('sn_hr_core_HR Comment Dialog');
        var msg = new GwtMessage().getMessage('Enter the reason for canceling the case');
        dialog.setTitle(msg);
        dialog.setPreference('sysparm_task_sys_id', sysId);
        dialog.setPreference('sysparm_task_table', 'sn_hr_core_case');
        dialog.setPreference('sysparm_ok_method_name', 'cancelCase');
		dialog.setPreference('sysparm_is_required', false);
        dialog.setPreference('sysparm_is_comment', 'false');
		dialog.on('hrComentDialogSucess', function() {
			dialog.destroy();
			gsftSubmit(null, g_form.getFormElement(), 'sysverb_update_and_stay');
		});
        dialog.render();
		return;
}