- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2015 12:49 PM
Hi ServiceNow Community Developers,
I have the following situation - I have a Requested Item form (sc_req_item table) that has catalog task (sc_task table) related list. When the work notes changes in the Requested Item form I need to send a notification to the assignment group that is in the catalog tasks related list. Would you please advise as to how do I dot walk from the sc_req_item table to the sc_task table to pick up the assignment group that is in this table and specify that as the group i want emails to be sent to. . I can see the 'Show related fields' link but I cannot tell which field to choose that will let me dot walk to the assignment group that is defined in the catalog task (sc_task) table. Please help.
Thanks,
Johannes
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2015 03:04 PM
you can only dot walk from a child to a parent... which is why this didn't work...
how to get the additional recipients isn't to hard.. write a mail notification script that looks up the people that have tasks assigned to them with that item as a parent then use "email.addAddress("cc",splitThis[i]);" to add the user to the email <put the user in where i have splitThis array>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2015 04:35 AM
In the case if you need to get the users involved in [sc_task] under a [sc_req_item],
1/ Query - Get the list of tasks that points to the request and add it to a String str_groups
2/ Query - get the users that are under str_groups.
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('group','IN',str_groups)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2015 04:24 AM
In my opinion, the best is to do what Doug Said to you in the previous comment:
- BR to copy the data written in the RITM to any active child [sc_task] (Because Closed ones are not intended to be affected by any action on the RITM)
- Notification at [sc_task] table to send an email when new data comes to the [sc_task],
- (managed through an event in order to set a complex conditions BR: gs.eventQueue('event', current, ...) )
- Recipient: user/group in fields: Assignment_group field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2015 02:45 PM
what we did for this requirement was a BR that copies the work notes from the item to it's children tasks when they are changed... this triggered the email we already had setup for the tasks for task updated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2015 04:40 AM
If Doug's suggestion does not workout , let us know His suggestion is far easier and makes use of the notification you may have already
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2015 06:15 AM
it also lets the techs work from the task only without having to keep going back to the item.. which is big for the fulfillment groups and why we did it this way!!