- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2016 06:29 PM
I am trying to determine how the system select the view to use when performing an update all or update selected from a list. The view varies from table to table so I presume this can be configured somehow.
Anyone have any ideas?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2016 07:06 PM
/**
* Script executed on the Client for this menu action
*
* The following variables are available to the script:
* 'g_list' the GlideList2 that the script is running against (only valid for List context menus)
* 'g_fieldName' the name of the field that the context menu is running against (only valid for List context menus)
* 'g_sysId' the sys_id of the row or form that the script is running against
* 'rowSysId' is also set to the sys_id of the row to support legacy actions, but g_sysId is preferred
*/
runContextAction();
function runContextAction() {
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_query', g_list.getQuery({fixed: true}));
url.addParam('sysparm_view', g_list.getView());
var msg = ['Update the entire list?', 'records'];
var answer = new GwtMessage().getMessages(msg);
if (!confirm(answer['Update the entire list?'] + " (" + g_list.grandTotalRows + " " + answer['records'] + ")"))
return;
window.location = url.getURL();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2016 07:12 PM
Mike,
Perfect, this is exactly what I was racking my brain trying to find.
Thanks,
Scott