Name
global.AWAUpdateSetUtils
Description
No description available
Script
var AWAUpdateSetUtils = Class.create();
AWAUpdateSetUtils.prototype = {
initialize: function() {
},
/**
* Add current to the update set associated with the current session scope.
* Intended for allowing AWA configuration update sets to include certain
* non-sys_metadata records.
*/
addToUpdateSet: function(current) {
var updateManager2 = new GlideUpdateManager2();
updateManager2.saveRecord(current);
// Make sure the update's application matches its update set's scope
var currentScope = gs.getCurrentApplicationId();
if (currentScope != 'global') {
var updateGR = new GlideRecord('sys_update_xml');
updateGR.addQuery('name', current.getTableName()+'_'+current.sys_id);
updateGR.orderByDesc('sys_updated_on');
updateGR.setLimit(1);
updateGR.query();
if (updateGR.next()) {
updateGR.setValue('application', currentScope);
updateGR.update();
}
}
},
type: 'AWAUpdateSetUtils'
};
Sys ID
72cbbbde737101104a905ee515f6a7ad