- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2017 07:54 AM
Hi all,
I have a requirement where i need to populate the CI ´s from Affected CIs tab into the journal field (Additional comments) . Please find the screen shot below.
Kindly let me know how to proceed on this.
Thanks,
Neha
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2017 08:41 AM
Please use below script in your business rule.
var aff = new GlideRecord('task_ci');
aff.addQuery('task',current.sys_id);
aff.query();
gs.log("No of records " + aff.getRowCount());
while(aff.next()){
current.work_notes = aff.ci_item.getDisplayValue();
//current.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2017 02:46 AM
Hi Sachin,
Thanks a lot. That worked
Thanks,
Neha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2017 01:36 PM
Hi all,
I have one more question to the above posted question. Now that the script works fine and affected CIs are added to the work_notes field. I have written this on 'Insert' and 'update' Business rule. But this is working when i change something on the field and save the form. For example: when i change the 'state' field on change request and save the form this works fine. I want it to be added to Work_notes field when i save the form.
Kindly guide me on this.
Thanks,
Neha
