Skip to content

Commit 31d00df

Browse files
authored
Create update_inactive_application_owner.js
Update the inactive application owner with their manager.
1 parent 0e05c51 commit 31d00df

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
var grApp = new GlideRecord("cmdb_ci_appl");
2+
grApp.addEncodedQuery("owned_by.active=false");
3+
grApp.query();
4+
while(grApp.next()){
5+
var managerSysId = grApp.owned_by.manager.toString(); // Get Manager SysId
6+
if (managerSysId) {
7+
grApp.owned_by = managerSysId;
8+
grApp.update();
9+
}
10+
}

0 commit comments

Comments
 (0)