- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2024 06:28 AM
Hey all,
I have a small question.
I want to create a new module under All. And when the user choose this module, I want a flow in the flow designer to be activated.
Do you know how this can be done?
Thanks.
Best,
Firat
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 01:15 AM
Choose Script (from Arguments) and paste the following script into the arguments field (docs)
// Starts the flow asynchronously.
var result = sn_fd.FlowAPI.getRunner()
.flow('global.myFlow')
.inBackground()
.withInputs(inputs)
.run();
Worth bearing in mind that the Flow runs asynchronously with the above code. No feedback will be presented to the user on the success or failure of the Flow.
As others have said, it's probably better to use the same script in a UI Action or a more context-sensitive area.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2024 06:51 AM
Yes mate, you catch it well now.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2024 07:01 AM
This did not work as it creating a record in this was is not the same as you create from service catalog.
But I might have found a solution.
- I can choose Link Type: Script
- Write a script include which trigger the flow.
This might be the real solution I am looking for.
Best,
Firat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2024 07:05 AM
This did not work as it creating a record in this was is not the same as you create from service catalog. - Yes this is the right way.
But I might have found a solution.
- I can choose Link Type: Script
- Write a script include which trigger the flow.
This might be the real solution I am looking for.
Atul: What is your use case? If you write the script on Link type, then also need a record to be created. Give a try buddy and share feedback.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 01:07 AM
My solution:
- I could not find a way to call a flow from a Module.
- Instead, I used a UI Action button and called a subflow.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 01:15 AM
Choose Script (from Arguments) and paste the following script into the arguments field (docs)
// Starts the flow asynchronously.
var result = sn_fd.FlowAPI.getRunner()
.flow('global.myFlow')
.inBackground()
.withInputs(inputs)
.run();
Worth bearing in mind that the Flow runs asynchronously with the above code. No feedback will be presented to the user on the success or failure of the Flow.
As others have said, it's probably better to use the same script in a UI Action or a more context-sensitive area.