- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2023 06:53 PM
Hi all,
We have setup a notification on the update of the additional comments on the hr case ticket. However, we have a requirement where in we need to avoid triggering this notification for the first comment that has been updated on the ticket.
I'm trying to trigger the notification through a business rule using the event trigger. Could you please help how can we achieve this functionality.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2023 07:39 PM
Hi, can you clarify\explain what you mean exactly by 'first comment that has been updated on the ticket'?
You do not want to send a notification for the first comment saved? regardless of who adds the comment (ESS user or fulfiller)? when it's added or how it's added?
If the comment field is mandatory at task creation and you are trying to stop a notification at insert you can include Updates ISNOT 0 in your notifications trigger conditions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2023 07:39 PM
Hi, can you clarify\explain what you mean exactly by 'first comment that has been updated on the ticket'?
You do not want to send a notification for the first comment saved? regardless of who adds the comment (ESS user or fulfiller)? when it's added or how it's added?
If the comment field is mandatory at task creation and you are trying to stop a notification at insert you can include Updates ISNOT 0 in your notifications trigger conditions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 12:09 AM
Hi Tony,
Thanks for the reply. My requirement is simple, for the first additional comment added on the ticket, it should not trigger the notification. It doesnt matter who adds it and how it gets added.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 02:07 PM
Hi, I think the easiest solution would be to add a true\false field to your task table and use a before BR to update this from false to true the first time a comment is added to the record. You can then reference the field in your notification trigger conditions so that the notifications only trigger when the field is true.
//trigger condition
current.comments.changes() && current.customFieldName == false
//code
current.customFieldName = true;
This solution delivers your requirement with minimal customization, and doesn't require any changes to OOB code\functionality.
But,
as a business process I cannot think of any situation where this would be best practice.
With the result likely to cause inconsistencies and confusion with BAU operations and\or client users, and I would not recommend deploying it in the real world.