Journal entries (comments or work notes) which are saved in sys_journal_field not showing in the Activity Stream


Description

When generating journal entries (comments or work notes) for a record via some script, the entries are being inserted into the sys_journal_field table and correctly reference the right document, but they are not showing in the activity stream of the record. 

Also, they do not show in the History of the record (Right-click the form header and select History > List).

Cause

Audit records (sys_audit) are not being generated for those journal updates because somewhere in the script which created the new journal updates the GlideRecord update or insert is having setWorkflow(false) called on it.

Resolution

Edit the script to not set the workflow to false.

Additional Information

Documentation on the set workflow method of the GlideRecord class.