- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2023 02:00 PM
How to query task table from Incident table and update the value using business rule?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2023 02:18 PM
To query the Task table from the Incident table and update the value using a business rule in ServiceNow, you can follow these steps: |
1. Navigate to the "Business Rules" module in ServiceNow and select "New". |
2. Name your business rule and select the "Table" for which you want to apply the rule, in this case, the Incident table. |
3. Under the "Advanced" tab, write the script to query the Task table and update the value. Here's an example script: |
//Query the Task table for records related to the current Incident |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2023 02:18 PM
To query the Task table from the Incident table and update the value using a business rule in ServiceNow, you can follow these steps: |
1. Navigate to the "Business Rules" module in ServiceNow and select "New". |
2. Name your business rule and select the "Table" for which you want to apply the rule, in this case, the Incident table. |
3. Under the "Advanced" tab, write the script to query the Task table and update the value. Here's an example script: |
//Query the Task table for records related to the current Incident |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2023 05:38 PM
The incident table is a child table of task, and inherits the fields from task. What field do you want to update on that task table record? Just set current.[field_name] to desired value in a simple script in a "Before" BR that runs on "Insert", "Update"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023 08:36 AM
I have custom field on task table. I created a before update and insert BR on task table. However, they want BR on incident table instead of task table. So I am glide-querying the task table to update custom field on task table.