Add info to subject with Email Script in Email Client Template (email action on a Change record)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
47m ago
Hello there,
I am trying to run an email script to add the current month to the subject, but it won't work.
Any idea why ?
I'm calling my email script in the HTML field of the Email Client Template. It should be running when a user wants to send an Email with the email feature on a Change record.
If it is impossible with this method, is there any workaround to achieve what I want to do ?
Thank you in advance.
Dorian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
20m ago
Hi @Dorian MOREL ,
Try this:
var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
var gdt = new GlideDateTime(); //November
var current_month = gdt.getMonth(); // returns number
email.setSubject("Test Subject : " + months[current_month - 1]);
Thanks
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
15m ago
Hi @Dorian MOREL ,
Can you use it in your notification subject, as shown in below image
Please mark my answer correct and helpful if this works for you
Thanks and Regards,
Sarthak
