
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 09:25 PM
I want to be able to trigger an event that will sent a notification - this I can do, however getting the parm1 value correct so it sends to the correct person, not so much.
So on the alm_asset table I have a field that I added called u_responsible_officer (reference field on the sys_user table)
What I want to do is the have a UI action - form link (on an alm_asset record) that triggers an event that send the notification to the name/email address of the person in the u_responsible_officer field.
I have the script I need to trigger the event successfully, I'm just not sure how to add the email address to the script to dynamically get it from the u_responsible_officer field.
gs.eventQueue("update.due", current, "u_resonsible_officer.email");
action.setRedirectURL(current);
gs.addInfoMessage("Email has been triggered");
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 09:39 PM
your syntax is wrong
Ensure Event parm1 contains recipient checkbox is True in your notification
I hope event, notification are on alm_asset table
gs.eventQueue("update.due", current, current.u_resonsible_officer.toString());
action.setRedirectURL(current);
gs.addInfoMessage("Email has been triggered");
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-24-2025 09:30 PM
Hi @Moedeb ,
In the gs.eventQueue don't include the 3rd parameter in quotes and 4th parameter you can send empty string.
It should be as below:
gs.eventQueue("update.due", current, u_resonsible_officer.email,'');
action.setRedirectURL(current);
gs.addInfoMessage("Email has been triggered");
Please mark it as helpful/correct if it solves your issue.
Best Regards,
Pooja

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 10:07 PM
Also didn't work, it tried to send the notification to the asset name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 09:39 PM
your syntax is wrong
Ensure Event parm1 contains recipient checkbox is True in your notification
I hope event, notification are on alm_asset table
gs.eventQueue("update.due", current, current.u_resonsible_officer.toString());
action.setRedirectURL(current);
gs.addInfoMessage("Email has been triggered");
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-24-2025 10:13 PM - edited 02-24-2025 10:13 PM
Sorry I had spelt the variable name wrong so there was an error coming up.
I have fixed the spelling error now and it is still not working - when I check the event log the parm1 value is blank.
So the correct script I'm currently using is:
gs.eventQueue("update.due", current, current.u_responsible_officer.toString());
action.setRedirectURL(current);
gs.addInfoMessage("Email has been triggered");
I can confirm that the event, ui action and the notification are all on the alm_asset table and the parm1 checkbox is ticked on the notification