LoginSignup
1
2

More than 3 years have passed since last update.

ServiceNow - 変更箇所一覧を表示する

Last updated at Posted at 2020-11-17

概要

バージョンアップする前に今までユーザが変更された内容を一覧表示したい場合があるます。

すべての変更

sys_update_xmlテーブルを表示するとすべての変更内容が表示されます。
image.png

特定テーブルへの変更を探すスクリプト

'''
var tableList = [
'sys_script_include',
'sys_ui_action',
'sys_script',
'sys_script_client',
'sysauto_script',
'sys_properties',
'sysevent_script_action',
'sys_ui_policy',
'sys_data_policy2'
];

for (var i=0; i<tableList.length; i++) {
getModifications(tableList[i]);
}

function getModifications(table) {
var grTable = new GlideRecord(table);
grTable.addJoinQuery('sys_user','sys_updated_by','user_name');
grTable.addQuery('sys_updated_by', '!=', 'admin');
grTable.query();
while (grTable.next()) {
gs.info(grTable.getClassDisplayValue() + ',' + grTable.getDisplayValue() + ',' + grTable.sys_created_by + ',' + grTable.sys_updated_by);
}
}
```

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2