We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to achieve Notification body to contain the date when it was triggered?

Arpitha Gopalsw
Giga Guru

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. 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

@Arpitha Gopalsw 

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.

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron

@Arpitha Gopalsw 

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.

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Thank you for the solution, it worked like a charm! 😊