The method "getJournalEntry()" does not work in the inline script of a Flow Action.

Steps to Reproduce

1. Create a new Flow with trigger as "Updated" on Incident table.
2. Set the condition to Work Notes changes.
3. Add a 'Log' action with level as Info, for 'Message', Toggle scripting on, and enter the below script:
var work_note = fd_data.trigger.current.work_notes.getJournalEntry(1);"Worknote_debug: " + work_note);
return work_note;

The result does not give the most recent entry on work notes, but just returns undefined/NULL.
The same script works in a Business Rule and in Scripts - Background.


This problem is under review and targeted to be fixed in a future release. To receive notifications when more information becomes available, subscribe to this Known Error article by clicking the Subscribe button at the top right of this form.
As a workaround, create a new GlideRecord and re-query it:
var gr = new GlideRecord(fd_data.trigger.table_name);
return gr.work_notes.getJournalEntry(1);

Related Problem: PRB1392719

Seen In

New York Patch 4
SR - IRM - Audit Management - New York 2019 Q3
SR - IRM - GRC Profiles - Madrid 2019 Q2
SR - IRM - GRC Workbench - New York 2019 Q3
SR - IRM - Policy and Compliance - Madrid 2019 Q2
SR - IRM - Risk Management - New York 2019 Q3

Intended Fix Version


Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-07-14 06:04:43