Modify value of install_status in cmdb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2025 10:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2025 10:23 PM
@CHAIMA ABBASSI Use below updated script:
var gr = new GlideRecord('cmdb_ci');
gr.addEncodedQuery('install_status=5^discovery_source!=SG-AWS^discovery_source!=SG-Azure');
gr.setWorkflow(false);
gr.autoSysFields(false);
gr.query();
var count = 0;
while (gr.next()) {
gr.install_status = 8; // or any valid sys_choice value
gr.update();
count++;
if (count % 1000 == 0) {
gs.print(count + ' records updated...');
}
}
gs.print('Done. Total records updated: ' + count);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2025 10:49 PM
Hello,
The 2 scripts doesn’t work in customer instance but it Work in my pdi instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2025 10:37 PM
Whats the use case?