Ui page from OnSubmit client script not working

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2023 07:07 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023 03:11 AM
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?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023 03:26 AM
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" -
Thanks & Regards,
Prasanna Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023 03:51 AM
on portal it won't work
Is it working fine in native?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023 04:29 AM
@Ankur Bawiskar It is not working in native as well.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2023 04:09 AM
@Ankur Bawiskar Please help on above issue. Both Portal and Native it is not working.
Thanks & Regards,
Prasanna Kumar