How do I open a GlideModal from a scoped app

petercawdron
Kilo Guru

I'm getting the error "SCRIPT:EXEC Error while running Client Script "GlideScopedScript": ReferenceError: GlideModal is not defined" when trying to open a glide modal using... 

var angularModal;
angularModal = new GlideModal();

Does anyone have any ideas on how to launch a glide modal from within a scoped script? Thanks.

1 ACCEPTED SOLUTION

Peter P_
Tera Expert

This didn't work for me. But I found this option:

var dialog = new GlideModal("sn_grc_modal");

Replace the dot by an underscore to get a UI Page in a special scope.

View solution in original post

5 REPLIES 5

Harsh Vardhan
Giga Patron

i think it should work.

where exactly have you created the UI PAge , is this also in scoped app? if yes then try with

 

angularModal = new GlideModal(scopeName.<UI Page Name>);

https://developer.servicenow.com/app.do#!/api_doc?v=london&id=c_GlideModalClientSideV3API

Thanks for the suggestion, unfortunately it didn't work.

It got me to try the following, but that didn't work either.

angularModal = new this_app.GlideModal();

Yaraslau
Tera Guru

It works!

 

var dialog = new GlideModal("sn_grc.modal");

Peter P_
Tera Expert

This didn't work for me. But I found this option:

var dialog = new GlideModal("sn_grc_modal");

Replace the dot by an underscore to get a UI Page in a special scope.