Email Script Needs to show current year
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2023 11:45 PM
Team ,
we have a notification which should show current year but it's showing 2022, i checked there is mail script running , can you help me , how it can be changed to current year (2023)
Script
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// Add your code here
var fiscalYear = current.u_year || current.u_actual_assignment.u_year || current.u_parent.u_year;
var fisCalYearArr = fiscalYear.split('-');
template.print(fisCalYearArr[1]);
})(current, template, email, email_action, event);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2023 12:46 AM
Thanks Buddy
I just used this below , however both year is showing now .
Please help me to fix this .