Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2018 03:08 AM
Hi,
Thank you for getting back to me. So I have added the above script to the Business Rule:
Business Rule Details:
Table - Incident
Runs on Update
When to run = Component Ci(s) IS NOT EMPTY
Script:
(function executeRule(current, previous /*null when async*/) {
var componentCIs = current.u_componenet_ci.split(',');
var taskCi = new GlideRecord('task_ci');
for(var i=0; i< componentCIs.length; i++){
taskCi.initialize();
taskCi.task = current.sys_id;
taskCi.ci_item = componentCis[i];
taskCi.insert();
}
})(current, previous);
When I run the action on the Incident form and click save no record is added to Affected Ci tab: