how to auto populate CI field in incident with respect to problem it is attached in ServiceNow ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi ,
How to auto populate CI field in incident with respect to problem it is attached in ServiceNow ? If I am changing CI field value in problem record then the value of CI field on associated incident also get updated . How to achieve it ?
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10 hours ago
You can create an onSubmit client script or a business rule to make that change when the Incident has been saved and the Problem has changed. The business rule would look something like this:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
9 hours ago
Similar to what Jennifer proposed, include logic to update the incident's CI. The BR would be defined on the 'problem' table. 'Advanced' would be checked, and the following script logic will update the incidents where the 'problem_id' field refers to the problem being updated. Script on the Advanced tab follows:
(function executeRule(current, previous /*null when async*/) {
// Look for incidents referencing this problem, update cmdb_ci there
var inc = new GlideRecord('incident');
inc.addQuery('problem_id', current.sys_id.toString());
inc.query();
while (inc.next()) {
inc.cmdb_ci = current.cmdb_ci;
inc.update();
gs.addInfoMessage('Incident: ' + inc.number + ' configuration item updated.');
}
})(current, previous);
Or, a client script that runs 'On change' for the problem table and cmdb_ci field that calls a script include with similar logic can work too.