Journal API
To use this functionality, you need to be on Version 1.10 or later.
The Journal Api provide easy access to Journal entries, without the need to do complex queries to the underlying table. This provides you the ability to get all the journal entries and the details within it (such as who made it and what date time).
Journal Field Api
Function | Returns | Description |
|---|---|---|
activity() | Array of journal entry objects | Returns the entire activity of a journal field (including the date time, user and more)Example:Table('Incident', 'INC0000005').ClientJournal.activity() |
activity(limit) | Array of journal entry objects | Example: Returns the first third entriesTable('Incident', 'INC0000005').ClientJournal.activity(3) |
Journal Entry
Apis above return journal entries for a given field, the following methods are available to get data from a single entry:
Function | Returns | Description |
|---|---|---|
author() | String | Returns the display value of the user that created the entry, usually:${FirstName} ${LastName} |
CreatedBy() | User record | Returns the actual table record of the user that created the journal entry |
UpdatedBy() | User record | Returns the actual table record of the user that updated the journal entry. For convenience, should always be the same as CreatedBy() |
CreatedOn() | Datetime | Returns when the journal entry was created |
UpdatedOn() | Datetime | Returns when the journal entry was updated. For convenience, should always be the same as CreatedOn() |
value()html()entry() | String (Html) | The journal html entry as it is stored |
text() | String (Text) | The journal entry with html escaped |
Examples
Table('Incident','INC0000005').ClientJournal.activity(1);
// [{author=Admin Administrator, createdOn=2024-05-21T19:10:44.966+10:00, value=<p>Hello World!</p>}]
Table('Incident','INC0000005').ClientJournal
.activity(2)[0]
.author();
// Admin Administrator
Table('Incident','INC0000005').ClientJournal
.activity(2)[0]
.html();
<p>Hello World!</p>
Table('Incident','INC0000005').ClientJournal
.activity(2)[0]
.text();
Hello World!