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 create popup for specific record in list view in "Action Check Boxes"

subrata_mettle
Kilo Contributor

I can get the popup window for the specific data within the page through " g_form" object and "GlideDialogForm"

as like the snippet :

find_real_file.png

But I want to open the popup from the list view for the selected incident from the "Action Check Boxes",

problem is that I am unable to get the sys_id for the selected Incident in the list view, through "g_form" we can get the sys_id if we have open the incident page.

how to get the sys_id in this scenario, if I will get the sys_id in my UI Action Scripts then I think I will be able to show the incident data in popup window.

find_real_file.png

12 REPLIES 12

Rakesh Mamidi
ServiceNow Employee
ServiceNow Employee

Use g_list and method getChecked() GlideList2 (g list) - ServiceNow Wiki


Thanks mvr, now I am able to get the sys_id for the checked one from the list.


But came across with strange behavior   .



For popup i am using GlideDialogForm object as mentioned below:


var dialog = new GlideDialogForm('Update incident', tableName);


dialog.setSysID(sysID); //Pass in sys_id to edit existing record, -1 to create new record


    dialog.addParm('sysparm_view', 'ResolveDialog'); //Specify a form view


    dialog.addParm('sysparm_form_only', 'true'); //Add or remove related lists


    dialog.render(); //Open the dialog



it's working only when I have open the particulate incident form, not working when I am in List view page and checked the incident with the Action Box option.


prithvirajchaud
Mega Expert

find_real_file.png


You can refer to this ui context menu. Your solution would be similar


Hi Prithviaj, thanks for your quick and valuable response.



I am doing the same thing as per the recommendation, but not able to see the new menu when i do right click on the incident no.


Can you please let me know what I am doing wrong here


find_real_file.png