From 33597dd094519c53d18db0bec0260c46ff8eaeae Mon Sep 17 00:00:00 2001 From: Abhishek Pandey <91930405+bird-03@users.noreply.github.com> Date: Thu, 3 Oct 2024 21:30:32 +0530 Subject: [PATCH 1/2] Create getLatestComment This mail script will be used to notify about the last comment added --- MailScript/getLatestComment | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 MailScript/getLatestComment diff --git a/MailScript/getLatestComment b/MailScript/getLatestComment new file mode 100644 index 0000000..81d008a --- /dev/null +++ b/MailScript/getLatestComment @@ -0,0 +1,12 @@ +(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template, + /* Optional EmailOutbound */ + email, /* Optional GlideRecord */ email_action, + /* Optional GlideRecord */ + event) { + + //Fetch latest comment and notify + + var comments = current.comments.getJournalEntry(1); + template.print(comments); + +})(current, template, email, email_action, event); From 024eec9599b9e6ba439825b640d45a0554eeb97b Mon Sep 17 00:00:00 2001 From: Abhishek Pandey <91930405+bird-03@users.noreply.github.com> Date: Thu, 3 Oct 2024 21:31:23 +0530 Subject: [PATCH 2/2] Rename getLatestComment to getLatestComment.js --- MailScript/{getLatestComment => getLatestComment.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename MailScript/{getLatestComment => getLatestComment.js} (100%) diff --git a/MailScript/getLatestComment b/MailScript/getLatestComment.js similarity index 100% rename from MailScript/getLatestComment rename to MailScript/getLatestComment.js