The CreatorCon Call for Content is officially open! Get started here.

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

Actually what you have explained above was not the reason of this issue. The main reason of this issue is PRB1361893 which I already mentioned above. But your answer was helpful.