Inline Script in Flow Designer not working

Sattyaki1
Tera Expert

I am trying to use the Inline Script in Flow Designer. I am trying to create an hr_case record with Create Record action and set the value of its Category field with inline script. Below is the screenshot and the code

find_real_file.png

/*
**Access Flow/Action data using the fd_data object. Script must return a value.
**example: var shortDesc = fd_data.trigger.current.short_description;
**return shortDesc;
*/
gs.log('flow');
var v = fd_data.trigger.inbound_email.direct.toString();
if (v == 'satt@gmail.com') {
    gs.info('flow script');
    var gr = new GlideRecord('hr_category');
    gr.addQuery('name', 'XYZ');
    gr.addQuery('active', true);
    gr.query();
    gs.info('gr val: ' + gr.hasNext());
    if (gr.next()) {
        return gr.sys_id;
    }
}

It is not even executing the first line "gs.log('flow')" as I can not see that in the logs. Please let me know what I am doing wrong.

1 ACCEPTED SOLUTION

It is fixed in NY Patch 7

View solution in original post

15 REPLIES 15

Just a silly idea:

WHat is the Release Version of your PDI, and which of your "other" instance (where the flow does not work properly)?

Is there a difference as well?

Let me know. please.

Thanks & BR

Dirk

Hi Dirk,

Both of them is New York (my PDI as well as our organization's DEV instance).

Thanks.

Hi

Are both Flows within the same scope?

(in your Dev and PDI instances?)

BR

Dirk

Hi

Just one more short question:

Do you have the same plugIns on the DEV instance, like on your PDI.

You wrote aboute an "HR CASE", which may need some extra Plugins to be available in your instance.

If you exported and imported the flow, maybe some basic prerequisites (existing tables from PlugIns) are even missing.

Let me know, if that solves your issue.

BR

Dirk

Hi

Where exactly did you take this screenshot?

Can you supply a bit wider screenshot (full screen or dialog) where this editor is located. That may be different ones, but I would like to relay your example a bit closer.

Thanks a lot

Dirk