- 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-23-2020 02:03 AM
Hi,
If this is in your PDI then share your instance details on dhananjay.pawar1111@gmail.com
Thanks,
Dhananjay.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2020 09:46 PM
Hi Arun,
I have made changes in your business rule and it is working fine.
Check it once and let me know if there is anything.
Thanks,
Dhananjay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2020 11:25 PM
Hi Dhananjay,
It's working fine. Thank you very much.
Regards,
Arun

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2020 11:31 PM
Hi,
Glad it helped you.
Have a good day and keep learning.
Thanks,
Dhananjay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2020 11:55 PM
Hi Dhananjay,
Surely. Thanks
Plz be safe and take care.
Regards,
Arun