The CreatorCon Call for Content is officially open! Get started here.

Getting error GlideDialogWindow is undefined when used in UI Action with client checkbox selected

zuber_crest
Kilo Contributor

Hello,

I am getting an error GlideDialogWindow is undefined when used in UI Action with client checkbox selected. I have created a function named openw() in my UI action script which creates an object of it. And this function is called on click. Also I have created an empty UI page named "Set Time Range".

onclick: openw()

Script:

function openw() {

var dialog = new GlideDailogWindow("Set Time Range");

dialog.setSize(400,400);  

dialog.setTitle("");

dialog.render();

}

Error which I am getting: "Uncaught ReferenceError: GlideDailogWindow is not defined" in browser console on triggering UI action in my App.

I am following exactly that is written in API reference - Client Side. Please guide me what am I doing wrong.

Thanks.

8 REPLIES 8

Chuck Tomasi
Tera Patron

Are you using Service Portal by chance?


Yes.


OK, GlideDialogWindow isn't going to work with Service Portal. You are going to need to write/configure the widget to use spModal.



See this OOB example: (change YOURINSTANCE to your instance name.)



https://YOURINSTANCE.service-now.com/nav_to.do?uri=sp_widget.do?sys_id=e03050735b400300514d484c11f91...


Thanks for the suggestion. But I am using Jakarta version in which sp_widget is not present.