Need to get the previous comment field value of a journal input type field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2023 04:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2023 11:51 PM
Hi, something this would check to see if there have been any comments added to the journal.
// get all journal entries and check that the result is not an empty sctring
if(current.comments.getJournalEntry(-1) != '') {
gs.info('there are comments');
} else {
gs.info('there are no comments');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2023 12:23 AM
HI Tony,
This is to check if there are current comments right? But I need to check if there exist some previous comments prior to the current comments.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2023 12:31 AM
Hi, 'current' is the current record IE the record running the BR
getJournalEntries checks the journal table for entries for the current record, IE previously saved entries for the record.
This is not the same as current\previous of a business rule, where previous is the last saved version of a fields value, and current is the value for the field that is being updated (not a 100% accurate definition, but perfect for this scenario).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2023 02:13 AM
Hi Tony,
I have used the below script to trigger the notification event when the comment field is updated the second time. Meaning, for the first comment it should not trigger the event, it should only trigger when the second comment is added on the journal input comment field. But it is not working as expected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2023 02:23 AM
Correction