how to show specific assignment groups from parent to child tasks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @LakshmannaP
For your use case -
Create an After insert/update Business Rule
- Navigate to System Definition > Business Rules and click New.
- Name: Sync Assignment Group to Child Tasks
- Table: Choose your specific task table
- When to run: Set When to after, check Update, and set the condition to: Assignment Group changes.
- Action tab: Leave blank (we will use a script for cascading).
(function executeRule(current, previous /*null when async*/) {
if (current.assignment_group.nil()) {
return;
}
var childTask = new GlideRecord(current.getTableName());
childTask.addQuery('parent', current.sys_id); // update Actual parent field in your child table
childTask.query();
while (childTask.next()) {
if (childTask.assignment_group != current.assignment_group) {
childTask.assignment_group = current.assignment_group;
childTask.update();
}
}
})(current, previous);
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Tanushree Maiti Did you try using the same reference qualifier as parent on the child assignment group field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Sandeep Rajput ,
Ref Qualifier - that is definitely an option . For me alternative solution is easy , that's why shared.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
@Tanushree Maiti My bad, I wanted to tag @LakshmannaP instead tagged you by mistake
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @LakshmannaP ,
You can use a Dynamic Reference Qualifier if your requirement can be met using one of the available Dynamic Filter Options. Dynamic qualifiers are easier to maintain than scripted qualifiers because they do not require custom scripting.
To configure this:
- Open the Dictionary Entry for the Assignment Group field.
- Under Use reference qualifier, select Dynamic.
- Choose the appropriate Dynamic Filter Option that matches your requirement.
If you found this helpful, please mark it as Helpful and Accept as Solution so it can reach others too.
If you found this helpful, please mark it as Helpful and Accept as Solution so it can reach others too.
Thanks & Regards,
Sachin Narayanasamy