How to dot walk from requested item form to catalog task related list field?

johannes5
Giga Expert

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

1 ACCEPTED SOLUTION

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>


View solution in original post

16 REPLIES 16

German Alvarez2
Tera Expert

Hi,



In fact, you can't dot walk, because the relationship is done from [sc_task] to [sc_req_item], so, yo need to script a GlideRecord Query at [sc_task] using .request_item field to filter with the request_item reference



Best Regards


Hi German,



Thanks for your response. This explains why I can't do it then because I have done some complex dot walking before but for some reason I could not figure out how to do it on this one.



My next question though is if I script and derive the group that I would like the emails to be sent to how do I then specify that group inside the email notification record or do I have to do that elsewhere?



Thank you in advance for your help.



Johannes


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>


Hi Doug,



If I want to send it to the assignment group though can i do so directly or i will have to breakdown the group into its members and send it individually to members like you describe above.



Thanks,


Johannes