- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 10:57 PM
Hi , i have a notification that with below code :
I am not able to understand why it is printing all the comments on the RITM , instead of printing the latest comment only .
ss:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 11:04 PM
Hello @avinashdubey103
System Properties >> Mail Properties
Change the number to 1. It would mean platform wide any notification sent for comments.
If you want it to be specific for a table you need mail script & use current.comments.getJournalEntry(1); & then use the mail script in notifications.
Change the number to 1. It would mean platform wide any notification sent for comments.
If you want it to be specific for a table you need mail script & use current.comments.getJournalEntry(1); & then use the mail script in notifications.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 11:01 PM - edited 02-07-2024 11:08 PM
Hi @avinashdubey103 $comments will print all the comments from that record, If you want latest comments then have a email script with line
var comments = current.comments.getJournalEntry(1).split('\n')[1]; // for latest comments
template.print(comments);
call the above script in your Notification using ${mail_script:scriptName}
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 11:07 PM
hello @avinashdubey103
Mail Scritp and than call it to notification
(function runMailScript(current, template, email, email_action, event) {
var latestcommentsare = current.comments.getJournalEntry(1);
template.print(latestcommentsare);
})(current, template, email, email_action, event);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2024 01:27 AM
Hi @avinashdubey103 just so you know changing the property will impact for all the tables,
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 11:04 PM
Hello @avinashdubey103
System Properties >> Mail Properties
Change the number to 1. It would mean platform wide any notification sent for comments.
If you want it to be specific for a table you need mail script & use current.comments.getJournalEntry(1); & then use the mail script in notifications.
Change the number to 1. It would mean platform wide any notification sent for comments.
If you want it to be specific for a table you need mail script & use current.comments.getJournalEntry(1); & then use the mail script in notifications.