- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 10:42 AM
Hello experts!
I have a requirement to fulfill - there are 2 notifications configured, both are triggered using events. One event runs on 2nd thursday of every month & another runs on the BR which triggers on insert with certain conditions.
How can i add those triggering dates into my notification body. What should be the notification script?? Please help me in achieving this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 08:48 PM
you can simply get the current date/time for this and print in email body
template.print(new GlideDateTime());
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
11-14-2023 10:58 AM
Hi, you might need to clarify requirements as the date\time that a sysevent is triggered will not be the exact date\time that a notification is sent from the platform.
Also, if your organization works across multiple time-zones, then you would need to identify the TZ that the timestamp was sent in.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 06:02 PM
Hi @Tony,
Thank you for your response. I need to populate the date only when the notification triggers. Is there any possibility that we can achieve this requirement is my primary question.
Regards,
Arpitha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 07:37 PM
Hi, normally this would be considered to be the sys_updated_on time for the record the notification is triggered for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 08:09 PM
You can access field data in Event Queue by using object event in your mail script.
#Event Created Time.
event.sys_created_on
#Event Processed Time
event.process_on
Cheers,
Tai Vu