- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 12:52 AM
■assumption
・What we want to do is send an email to the users checked in the user table
・Email property settings.
・I wrote this code in the script include
(In fact, we will store the address obtained from the ui action)
(I put sys_id Third argument and it didn't work.)
・notification
・Checked.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 05:35 AM
Hello @honamiUeo ,
I think the issue is from the parameter
sysparam_checked in UI Action
sysparm_checked in Script Include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 02:08 AM
in line 15 you should not use current object. please use gr object which is GlideRecord object of sys_user
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
09-14-2023 02:16 AM
Thank you for letting us know.
I changed to the script below, but the event did not fire.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 02:27 AM
ideally it should trigger now
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 04:21 AM
I'm sorry, what do you mean it should be activated now?
Also, there was progress to the point where it was written to the event log. Thank you very much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 05:14 AM
so were you saying earlier that event is getting triggered but email is not sent because that's what your question said.
now that you are saying event is getting processed why email is not getting triggered?
is that user having notification preference enabled?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader