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

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

is this OOB ui page?

Is this happening for all records?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Yes,this is happening for all the records.

The more important question to answer is:

is this OOB ui page?

I'm guessing, it is not. In that case, you would get better help, if you shared the HTML of UI Page sn_hr_core_HR Comment Dialog - at least the area where the buttons are added to the page.

Ravi9
ServiceNow Employee
ServiceNow Employee

it seems to me a oob page and it should work oob when u click the ok button unless u customized it which might have broken it ! 

find_real_file.png