- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2019 08:19 PM
Hi
I've created a business rule on the change_request table which is triggered when change state goes to implement and the action is supposed to update the affected configuration item state to "in maintenance".
I can see in the business rule debug that this is being triggered however, it isn't changing the state of the CI. Is the business rule configured correctly?
Solved! Go to Solution.
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2019 09:40 PM
Thanks
I wrote the below script which works.
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var CMDBci = new GlideRecord('cmdb_ci'); //glide record to ci
CMDBci.get('sys_id', current.cmdb_ci); //grab the sys_id matched from current ci
CMDBci.setDisplayValue('install_status','3'); //update to in maintenance
CMDBci.update();
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2019 10:23 AM
Hi,
Can you make this to an After BR and see if it works for you?
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2019 10:25 AM
Since the update is occurring on the Change Request table, you'll have to use a GlideRecord to query the CI and update the State.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2019 09:40 PM
Thanks
I wrote the below script which works.
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var CMDBci = new GlideRecord('cmdb_ci'); //glide record to ci
CMDBci.get('sys_id', current.cmdb_ci); //grab the sys_id matched from current ci
CMDBci.setDisplayValue('install_status','3'); //update to in maintenance
CMDBci.update();
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2021 02:51 AM
The below Business Rule Script is working fine for the Scenario: To change the status of all Affected CIs to Retired when Change Request state changes to Closed.
You can change the script according to your requirement.
When to run : set When as async and Filter Conditions as State changes to Closed
Thanks,
Ritesh