After Business Rule
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2024 10:25 AM
Hello Experts,
I want to set the field value for the work note field on the incident form when the incident state is updated to resolve. I am trying to use after business rule. but it's not working when I try with the before business rule it's working. please tell me why I am not able to set a value on record to get an update. thank you.
//Before Update Business Rule Code
(function executeRule(current, previous /*null when async*/) {
var arr_ci=[];
var gr=new GlideRecord('task_ci');
gr.addQuery('task',current.sys_id);
gr.query();
while(gr.next())
{
arr_ci.push(gr.getDisplayValue('ci_item'));
}
current.work_notes = 'Task is currently assigned to InfoSec team'+arr_ci;
})(current, previous);
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2024 11:20 AM
🤣
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field