Open GlideURL from GlideModal

jmcagod
Kilo Guru

Hello,

We have a requirement to do a Bulk Update on Incident table - Similar to context menu 'Update Selected' , but using a List UI action.

I copied the code below from Update Selected Context Menu, and tried to Open it in a popup window using g_navigation.openPopup()

But I got the error message below.

Is there a way to open this URL to a modal/popup window and exit the window once the update is made?

Thank you!

 

UI Action Script:

function showSelectParentIncidentDialog() {

var title = g_list.getTitle();
var listID = g_list.listID;
var incidents = g_list.getChecked().toString();


var url = new GlideURL(g_list.tableName + '_update.do');
url.addParam('sys_action', 'sysverb_multiple_update');
url.addParam('sysparm_multiple', 'true');
url.addParam('sysparm_nostack', 'yes');
url.addParam('sysparm_checked_items', 'sys_idIN' + incidents);
url.addParam('sysparm_view', g_list.getView());

var link = url.getURL();

g_navigation.openPopup(link, 'Active Incidents', 'resizable,scrollbars,status', false);

}

 

Error Message:

find_real_file.png

 

1 REPLY 1

jmcagod
Kilo Guru

I got it working, I did something wrong to my code

UI Action Script:

function showSelectParentIncidentDialog() {

var title = g_list.getTitle();
var listID = g_list.listID;
var incidents = g_list.getChecked().toString();


var url = new GlideURL(g_list.tableName + '_update.do');
url.addParam('sys_action', 'sysverb_multiple_update');
url.addParam('sysparm_multiple', 'true');
url.addParam('sysparm_nostack', 'yes');
url.addParam('sysparm_checked_items', 'sys_idIN' + incidents);
url.addParam('sysparm_view', g_list.getView());

var link = url.getURL();

g_navigation.openPopup(link, 'Active Incidents', 'resizable,scrollbars,status', true);

}

 

Additional Question: 

Does anyone know if I can close the window after I do an update? 

and or if I can reload the page once I close the window?

 

Thank you! 

Jamie