How to access glide record from Scripted REST API after subflow call
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2023 04:47 PM
I have created a scripted REST api where I read the input parameters and then call a subflow based on the request parameters.
However, after the subflow call, it appears as though the control is not coming back to the scripted REST api. I have added a simple log after the subflow call but even that doesn't get logged.
This is the call to subflow - (IncidentTaskUpdate is my subflow name)
sn_fd.FlowAPI.executeSubflow('IncidentTaskUpdate', inputsUpdate);
Immediately after this subflow call, i have added a log statement as below -
gs.info("After subflow call");
However, even this is not getting printed in the system logs.
The subflow has 2 simple steps (2 inputs correlation id and work notes, No Outputs) -
1. Lookup record based on the correlation id
2. Update record with work notes
Any pointers???

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2023 05:25 PM - edited ‎02-21-2023 05:30 PM
Hello,
Have you verified if the subflow is even being called? You're mentioning a lot statement after the fact, but you haven't told us if the subflow has ran and updated the work notes, etc. Also, I believe the suggested API has changed to: https://developer.servicenow.com/dev.do#!/reference/api/tokyo/server/sn_fd-namespace/ScriptableFlowR...
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2023 07:05 AM
Hi Allen,
Yes the subflow is updating the work notes in incident task correctly as expected. And we are still on San Diego
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2023 06:50 PM
@Saquib Mohammed i am not sure if you are using exception handling (try/catch), if not I will suggest you to keep you code in try and capture error in catch.
Hope this can suggest you something to check further.