Trigger event from business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 04:59 AM
Hi team, I have a business rule set up to fire an event on an email notification. I can see in the event log that the event is being triggered, however it is not sending the email notification for some reason!
Business rule & BR script:
Table: x_lbg_fbs_case_fbs_case
When: After , Insert, Update
Filter Conditions: none
Script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 06:40 AM
Ensure "Event parm1 contains recipient" as True in notification
Remove this -> Who will receive: Assigned to
Send to Event Creator - True
update as this
gs.eventQueue('x_lbg_fbs_case.LBGGFScasenew', current, current.assigned_to.email.toString(), previous.assigned_to);
Also ensure that user is active, not locked out, has email and has notification preference enabled.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 08:58 AM
Hi I enabled the user to receive email notifications in dev, assuming they will have access to receive in prod.
This has solved the issue and the email notifications are being triggered, but I need to include 5 assignment groups into the business rule script. I have created a system property 'GFS.case.email.notification' - how can I implement this property into my existing business rule script so that when the email notification triggers it only is assigned to the 5 groups (I have included all 5 sys id's inside the value within the system property)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 12:57 PM
Hi @LJ_23
You can add below logic in your script.
var assg= gs.getProperty('GFS.case.email.notification'); //get the value from property
//replace current.assignment_group.toString() as per your requirement
if(assg.indexOf(current.assignment_group.toString()) > -1) // check if current assignment group is part of the list
{
//your logic here.
gs.eventQueue('x_lbg_fbs_case.LBGGFScasenew', current, current.assigned_to.email.toString(), previous.assigned_to);
}
You can remove below line from your existing code and add as a condition in your BR.
if (current.assigned_to.changes() && current.assigned_to)
Filter Conditions -
Assigned To || changes AND Assigned To || is Not empty
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 01:48 AM
Am i adding this script to the existing script, I have deleted the script in the business rule and added both this new script and the condition but now it doesnt work at all and no email is being triggered.