glide.email.journal.lines

shiki
Tera Contributor

We are considering the operation of including the values written to a journal type field created on an incident form in an email notification.
Since the number of journal type fields written exceeds 3, we are considering changing the value of the system property “glide.email.journal.lines”.
This “glide.email.journal.lines” value is “3” by default. Why is the value of glide.email.journal.lines set to 3 by default?
Is it a bad idea to change it to something higher than “3”?

4 REPLIES 4

Chaitanya ILCR
Kilo Patron

Hi @shiki ,

yes, you can increase the value. (better keep it to less than 6 or  7)

 

Why is the value of glide.email.journal.lines set to 3 by default?

the older entries would be included included in the other emails adding more would look like you are adding repetitive content in the emails and the older content is might not be relevant.

 

 

 

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

thanks.@Chaitanya ILCR 
Why should we keep it below 6 to 7?

Hi @shiki ,

the older work notes might not be relevant and with email sent out the work notes information appears as repetitive

 

example 

if there are 4 work notes and 4 emails

the 1st work note would be part of all the the emails and is might not be relevant and 2nd would part of last 3 emails and 3 would be part of last 2 emails and so on

 

imagine if you have 20 or 30 work notes (or comments) the emails will have lot of content 

 

if it's just for a set of notification you can go with @Ankur Bawiskar  approach

 

 

if you wan this in the entire instance you can go with system property update 

Ankur Bawiskar
Tera Patron
Tera Patron

@shiki 

don't do that as it will impact entire instance where journal type fields are used in email notifications.

Why not use email script and get whatever number of last journal entries you want?

you can use this sample script and enhance it

var fieldName = 'work_notes';

var rec = new GlideRecord('sys_journal_field');
rec.orderByDesc('sys_created_on');
rec.addQuery('name', current.getTableName());
rec.addQuery('element', fieldName);
rec.addQuery('element_id', current.sys_id);
rec.setLimit(5); // this will print latest 5 journal entries
rec.query();
while (rec.next()) {
    template.print(rec.value);
}

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader