Emails should not trigger when child task comments added to parent task

Community Alums
Not applicable

Hi,

Currently I have Parent task and child tasks associated to parent, when comments added to child task they will be copied to parent task and on Parent task I have a email notification configured when comments changed. Here my requirement is when child task comments added to parent email should not trigger only when comments added directly to the parent task then only notifications should trigger. Is there a way to achieve this? Please advice.

 

Regards,

Prudhvi 

2 ACCEPTED SOLUTIONS

GopikaP
Mega Sage

Hi @Community Alums , how are you triggering the notification? If it is through an event or business rule, you can add - 'setWorkflow(false)' in your business rule that is copying your comments from the child to parent record. But if it is triggered directly from the notification conditions, I guess we cannot prevent the notification.

 

Email Notifications Not being Fired due to setWorkflow(false) or setUseEngines(false) - Support and Troubleshooting

View solution in original post

@Community Alums 

when you use that it won't trigger any after update business rule, notifications, workflows, flows etc

So please discuss with your customer for this
OR

Try adding some unique comments like "Comments from child" and then determine this in notification condition so that it doesn't send email when comments gets added from child business rule

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

9 REPLIES 9

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Community Alums 

I don’t think so, but I’m not a developer. However, from what I understand, the backend logic works in such a way that whenever a comment is added to a record, the system generates an email. It doesn’t matter who added the comment or how it was added, so I believe there’s no different way to identify who added the comment to include this in our condition.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Rohit  Singh
Mega Sage

Hi @Community Alums ,

 

I agree with @Dr Atul G- LNG there is no way that system identify that the comments in parent task are copied from it's child table and hence stop notification in that case.

 

If my response helped, please mark it helpful and accept the solution so that it benefits future readers.

 

Regards,
Rohit

Hi @Community Alums ,

 

There is one work around but it will have lot of customization. 

 

  1. When you are copying comments from child to task (may be FD or BR) then concatinate some message like. "Comments added from Child" + work_notes.
  2. Set up your  notification through event.
  3. Generate your even through BR written in Parent Table. In if Condition check if current.work_notes contain "Comments added from Child" or not.
  4. If it does not contain then trigger your event queue using gs.evenQueue
  5. If it contains "Comments added from Child" then don't trigger your event.

If my response helped, please mark it helpful and accept the solution so that it benefits future readers.

 

Regards,
Rohit

Community Alums
Not applicable

Hi @Rohit Singh, Thanks for the response I will give a try using suggested work around