
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2020 09:55 AM
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
/*
**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.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2020 05:36 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2020 05:35 AM
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.