- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2020 09:15 PM
Hi All,
I need help on the below requirement. At the moment when the incident is resolved there will be an incident task gets created. Here i want to copy the state of the incident task to a string field on incident table. Already i've tried with the Display BR it's working but it's not saving the value, I've tried with before / after BR but no luck. Can someone guide me on how i can achieve the same.
Below is the simple piece of code that i'm using inside the Display BR
var rec = new GlideRecord('incident_task');
rec.addQuery('incident', current.sys_id);
rec.query();
if (rec.next()) {
current.u_category_on_open = rec.state.getDisplayValue();
}
Regards,
Arun
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2020 01:56 AM
Hi Arun,
I tried same in my PDI and it is working properly.
Check attached screenshots.
Business Rule -
Incident task record -
Incident record after resolved.
See result in log
Thanks,
Dhananjay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2020 09:26 PM
Try Using After/Async Updated business rule and condition:State changes to resolved and then query the same.Kindly check field name also
Kindly mark Correct and Helpful if it helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2020 11:13 PM
Hi Amit,
I've tried the same, but no luck.
Regards,
Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2020 09:27 PM
Hey Arun,
Here is the same thread you Looking for, it might help you:
Mark Correct and Helpful if it helps!!!
Best Regards,
Namrata.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2020 11:16 PM
Hi Namrata,
In that link it says with Display BR. Even my script is working fine as Display but it's not updating the value in the database. We need to use other methods.
Regards,
Arun