We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69c730d commit a8fe7baCopy full SHA for a8fe7ba
Specialized Areas/CMDB/UnsyncCI from Asset/script.js
@@ -0,0 +1,22 @@
1
+unsyncCI();
2
+
3
+function unsyncCI() {
4
5
+ var grAsset = new GlideRecord("alm_hardware");
6
+ grAsset.addEncodedQuery('sys_id='); //replace query with rrequired list
7
+ grAsset.query();
8
+ if (grAsset.next()) {
9
+ var grCI = new GlideRecord("cmdb_ci");
10
+ grCI.addQuery("sys_id", grAsset.ci);
11
+ grCI.setLimit(1);
12
+ grCI.query();
13
+ if (grCI.next()) {
14
+ grCI.asset = '';
15
+ grCI.setWorkFlow(false);
16
+ grCI.update();
17
+ }
18
+ grAsset.ci = '';
19
+ grAsset.setWorkFlow(false);
20
+ grAsset.update();
21
22
+}
0 commit comments