How do you use a script include in Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2021 09:17 AM
Hey everyone,
I am currently trying to call a script include in a script action as part of my flow. However, when I do this using the
var foo = new ScriptInclude();
It gives me an error saying that the "ScriptInclude" is not defined. Is there a special way of using a script include in flow? Any advice is awesome.
Thank you,
John
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 08:02 PM
you should use the api name of the script include when calling from flow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2022 04:40 AM
Hi John,
Not sure if you still have this issue.
But I had the same issue, and in the end I was able to solve it by deleting the specific Flow action, and rebuilding it.
The second time it was working fine.
This might help for you as well.
Kind regards,
Matthijs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 02:48 AM
Hi, had the same issue in Vancouver - undefined, new global.NameOfScriptInclude()
it turned out - if it's under if condition than it's undefined..
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0791144
Workaround:
1. define flow variable in the body of the flow + use the script include (I haven't tested subflow which could be used as well)
2. use the defined flow variable in the action