- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 03:06 PM
So, I have defined a fairly simple custom JavaScript action in flow designer that queries a table using two inputs and returns a result. Alternatively, I could do a Lookup Records action in the flow, but creating a script action is perfectly capable for doing a lookup and will be necessary for some more complex actions that I need to create that can't be accomplished with the regular non-custom actions. When I test the custom JavaScript action using the test capability in Flow Designer with inputs X and Y, the output is always Z. When I use that action in a flow and test where the inputs are EXACTLY the same (X and Y), the output is W. The correct output should be Z. What in the heck is going on? See screenshots. This is in Quebec.
- Frustrated Developer
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2023 09:28 AM
I wanted to post another reply. I've found the issue. In the flow that uses the action, the input is actually a reference. In the test for action alone the input is plain text string. It's a little ambiguous, but if you run into the same issue I had, pay attention visually to when SN makes the runtime value a link as opposed to just plain text even if the text on the link is the same as the plain text that's not a link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 05:37 PM
Is it possible the version you’re testing with is not published?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2023 07:55 AM
@ricker Sadly, no. Action is Saved and Published. Flow is saved and Activated. I even removed the action from the flow, re-added it, and re-ran multiple times. I have no idea how to debug what's happening. I feel like it's a fairly major bug.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2023 10:43 AM
It is weird. What about permissions? Run as user or scope access? Seems unlikely but worth a look if you haven’t already.
Have you tried the flow in a newer version? Does it do the same thing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2023 11:10 AM
@ricker I guess there's no need to go any further. I spun up a San Diego instance, recreated all my data (took a while) and did the same test. In San Diego, when using the same inputs to the action and same inputs to the action within the flow, yield the same outputs. I'm in shock and awe that this issue wasn't discovered with Quebec. See screenshots.
For anyone else with the same problem, the workaround for me was to go from using customized action with a script inside it that called some script includes to get the data need to just doing a whole bunch of built-in flow steps to slowly build to the data needed. It was nice to have the custom action because it could be used across flows, but I don't know how to make this custom action work in Quebec.