- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 11:19 PM
Hi @JessicaM6884345
You can try as below.
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
var date=current.sysapproval.variables.select_end_date_time.getDisplayValue();
var msg="Date is not valid"
if (date)
{
msg='Date is valid';
}
template.print(msg);
})(current, template, email, email_action, event);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2023 08:59 AM
Hi @JessicaM6884345
In mail script you already have the current object using which you can dot walk to RITM table, no need to do GlideRecord on RITM table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2023 09:16 AM
Your code below is working out perfectly. I will replace my version with yours. Awesome, I learned something new today. Thanks to you and the other helpers.
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
var date=current.sysapproval.variables.select_end_date_time.getDisplayValue();
var msg="Date is not valid"
if (date)
{
msg='Date is valid';
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 11:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 11:25 PM