Add Current Date in Quick Messages template

Navneet Arora1
Kilo Expert

Hi All,

I have to add dynamic current date in Quick Messages and I know that we cant use Mail Scripts in Quick Messages , I have tried a few things but didnt work.

Please suggest how to customise Quick Message body to add the Current date as a variable and display in emails.

Regards,

Navneet

3 REPLIES 3

Supriya13
Giga Expert

Hello Navneet ,

 

You can try below code to set current date

var nowDate = gs.now();

template.print(nowDate);

 

Thanks,

Supriya

Hi Supriya,

We cant use email scripts in Quick messages.

Mandeep Karan
Tera Guru

Hi Navneet,

 

I too have the similar requirement as of yours problem statement, and we implemented this solution to achieve this.

In quick messages added a text like this {business_rule:current_date_time}

Then, I created a BR on sys_email table on send-ready condition to replace the {business_rule:current_date_time} with new GlideDateTime() value.

you can refer this article from community: https://community.servicenow.com/community?id=community_question&sys_id=74e90729db5cdbc01dcaf3231f9619c3 

Hope this will help you out too. 🙂

 

Regards,

Mandeep Karan