Notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 03:42 AM
There is one requirement came up like once the Parent case Status Changes to awaiting info, similarly Child case Status should also change as well. I should stop notification when parent case state changes to awaiting info. Again notification send to customer when only any child case state changes to awaiting info via parent case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 03:48 AM
You can write after business rule and use eventQueue method to trigger the notification, Sample code below:
(function executeRule(current, previous /*null when async*/) {
// Check if the current record is a child case and its parent is awaiting info
if (current.parent && current.parent.state == '18' && current.state.changes()) {
// If the parent case's state is "Awaiting Info" and the child case's state has changed
// Send notification
gs.eventQueue('child_case_awaiting_info', current, current.sys_id);
}
})(current, previous);
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 04:33 AM
can we use this code in advanced conditions script in notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 04:38 AM
I don't think so instead you should try to write BR and trigger notification from there.
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks