Send email notification to Parent ticket owner when child task state changed to 'Pending Validation'

denu
Kilo Expert

I wanted to send email notification to parent ticket owner(Assigned to) when child ticket state changed to 'Pending Validation' from 'Working Progress'.   Can someone please advice me how to do this?

find_real_file.png

1 ACCEPTED SOLUTION

nitin_kumar
Mega Guru

1. Create an Event.


2. Write a Business rule on the child table, such that the created event gets triggered when the state changes to Pending Validation. Pass the parent ticket owner(can be retrieved via dot walking) as parm1 while triggering the event.


gs.eventQueue("name of the event", current, parent owner sys_id);


3. Create a notification and send it when the newly created event is triggered and send the notification to event parm1 (tick the checkbox).



If confused use this as reference -   Events and Email Notification - ServiceNow Wiki



Thanks,


Nitin



PS : Mark the answer as Like, Helpful or Correct based on the impact


View solution in original post

8 REPLIES 8

Thanks Nitin



This is now working after I adjust the script.   Also use the condition builder instead of adding the condition within the script as you advised.



Business Rule

if (current.state.changes() && current.state == -42) {


  gs.eventQueue("pending.validation", current, current.source.assigned_to.email, current.source.assigned_to.getDisplayValue());


}


find_real_file.png




Many thanks Nitin


You are welcome. Can you mark my answer as correct so that it would easy for others with the same question to find it easily


Thanks


Nitin.


Hi Nitin,



I'm having the same issue.   Please see my thread:   need help with notification



Could you help me please?



Thanks,


Sarah


Hi Nitin,

I hope you are doing great..!!

Can you look into this question. This is almost similar to the question you have answered.

https://community.servicenow.com/community?id=community_question&sys_id=ad581977dbb7c898f7fca851ca96...

Thanks,

Jay