How to call script include in flow designer to call flow again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 06:15 AM
I have requirement to call flow inside flow and add approval
I am creating multiple RITM based on list collector field and want to add same flow on each RITM to add approval and update record.
added below script include but not working
same script if run in background then it will work
script include :
-----------------------------------
how to achieve this? @Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 06:20 AM
Hello @shweta14 ,
If you want to call script include from flow, you can add script action (we have script button on every action) and try to write below code
new StartFlow ().startflow(); // StartFlow is your script include and startflow is a function written in script include
Please mark my answer as helpful & correct, if it helps you
Thank you
Thank you
G Ramana Murthy
ServiceNow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 06:31 AM - edited 04-29-2024 06:45 AM
can we use set flow variable instead of creating action
and if we use action then what should be the input
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 11:02 PM - edited 04-29-2024 11:03 PM
set flow variable script is working but when call flow for second record showing below error on flow(no record found)same script if i run background then there is no error @Ankur Bawiskar
how to solve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2024 12:05 AM
Hi @shweta14
From background script it will work because your passing the value hardcoded and hence it will work as expected. Here whats happening is that your value is not being passed to the flow to process.
Before the execution on your script logic try to log or print the variable value to see if it holds some value or its just being passed empty.
If it holds value it must work as it worked in background. Try to log and catch the fix
I hope this helps 🙂
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....