Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to call GlideDialogWindow from application scope

randeepnath
Mega Contributor

I tired to call GlideDialogWindow from Global scope, it is working fine (see the following code ), but the same code when we are calling from application scope not working - Any idea

function popupDispList() {

    //Initialize the GlideDialogWindow

    var gdw = new GlideDialogWindow('display_incident_list');

  gdw.setTitle('Incidents');

  gdw.setPreference('table', 'incident_list');

  gdw.setPreference('sysparm_view', 'default');

    //Set the table to display

    var num = g_form.getValue('number');

    var query = 'active=true^priority=1^number!=' + num;

  gdw.setPreference('sysparm_query', query);

    //Open the dialog window

  gdw.render();

}

How we can call this from the application scope ???

Thanks in Advance !!

13 REPLIES 13

randeepnath
Mega Contributor

Hi Ashutosh



I have written this code in UI action, but in scoped application.


You will have to create a ui page for this and then it will work....



let me know for more guidance on UI page.



Re: GlideDialogWindow



Displaying a Custom Dialog - ServiceNow Wiki



Check this out


randeepnath
Mega Contributor

Hi Asuthosh



To create a UI page it will be more complicated in my case - as I have to create a UI page that is displaying as same as a table view with pagination and action items..



Could you please give me a sample UI page for this


Actually i am checking on it,


It works well on incident form or global application,


but it is not on scoped application, i am drilling into it will get back to you soon.




thank you,


Scoped Application code is not able to read number from incident table from your code,


tried getting number but it is showing blank.


i think it might be restricting other table which are out of scope