I have a workflow that is using a multi-step function within a loop block. The function takes data stored in a parameter from the main workflow and uses that data to populate variables in a SOAP call.
The error that is returned is the following: Cannot read properties of null (reading 'replace')
I have tried a few different routes for the parameters: one parameter with all of the JSON, a parameter for each of the values needed. I've also tried building the raw SOAP message ahead and then just inserting it. I triple-confirmed that data exists for all variables in the SOAP body.
I've done something almost the exact same way but with a regular REST endpoint but something with the SOAP call is different enough to fail.
Any idea why the variables could be interpreted as null when using SOAP vs REST?
Hi @roundingwill, not sure if this is the issue but I've seen some weird behavior recently with multistep functions called from loops, where the function params dont get passed in. I'm not sure what causes the issue but I reproduced it and sent a bug request.
Part of the weird behavior is that I've created other identical loops that don't seem to have the same problems. Duplicating the loop doesn't work either, you have to manually recreate it from scratch. I believe it may be similar to this topic.
Thanks. Yes, I saw that post. I tried recreating the loop multiple times as well as recreating the multi-step function. I ended up having to not use the multi-step in this situation. It's a shame though because being able to use multi-step on a loop is a very clean way to handle processing multiple records in an array.