Notifications

354 views

Symptoms


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).

Release


ALL

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 setWorkflow method of the GlideRecord class.

https://docs.servicenow.com/bundle/kingston-application-development/page/app-store/dev_portal/API_reference/GlideRecord/concept/c_GlideRecordAPI.html#ariaid-title75

Article Information

Last Updated:2018-06-01 00:43:41
Published:2018-05-01