Ui page from OnSubmit client script not working

prasannakumard
Tera Guru

Hi Team,

 

We have created a UI page and that display when submitting the Catalog item. We have write script for the same, but, the after submitting the catalog item, UI page appears and If I click on OK the UI page button, UI page is disappear and catalog item stays on the same form. Please let me know where exactly modify the script.

 

UI page client scrpt:

function cancel(){
GlideDialogWindow.get().destroy(); //Close the dialog window
return false;
}
function submit(){
GlideDialogWindow.get().destroy();
return true;
}

 

Catalog item onSubmit script:

 

function onSubmit() {

//show modal dialog

var dialogClass = window.GlideModal ? GlideModal : GlideDialogWindow;

var dialog = new dialogClass("Acknowledgement");

dialog.setTitle("Acknowledgement");

dialog.setWidth(600);

dialog.render();

return false;

}

Thanks & Regards,

Prasanna Kumar

16 REPLIES 16

@prasannakumard 

did you try using DOM manipulation and click the Submit button? it will work in Native view

Also for portal the UI page is loading?

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

Yes @Ankur Bawiskar 

I've removed Isolate script = False, also, on Portal UI page is not loading and getting "There is a JavaScript error in your browser console" - 

prasannakumard_0-1677583588081.png

Thanks & Regards,

Prasanna Kumar

 

@prasannakumard 

on portal it won't work

Is it working fine in native?

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

@Ankur Bawiskar It is not working in native as well. 

@Ankur Bawiskar Please help on above issue. Both Portal and Native it is not working.

Thanks & Regards,

Prasanna Kumar