Notifications

273 views

Description

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);
gs.info("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.

Workaround

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);
gr.get(fd_data.trigger.current.getUniqueValue());
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

Associated Community Threads

There is no data to report.

Article Information

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