How to auto-populate incident field in incident_task table ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2023 10:46 AM
How to auto-populate incident number of incident table to incident field of incident_task table ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2023 12:25 PM - edited 04-04-2023 01:49 PM
You can create after business rule on Incident task table. Your business rule should run on Insert and Update
Please make sure to check advanced checkbox.
(function executeRule(current, previous /*null when async*/) {
var nmr = new GlideRecord ('incident'); // Incident Table
nmr.number = current.<incident field of incident task table> ;
current.update() ;
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2023 11:11 PM
Thank you @Alp Utku for replying.
It seems without having any query statement It may not return the required record.
My requirement is to auto-populate incident field of incident_task table.
You can follow the below attachments.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2023 01:13 AM
You are right, you need to add query statement to fetch number from the Incident table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2023 01:53 AM
Yes, I can write a BR to fetch the number from the incident table, but I want to know how can I use this fetched data on another table like incident_task table.
I want to set value of incident_task table incident field with the value of its parent table ( i.e incident ) number field.