- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2025 04:54 AM
I have created a Subflow to fetch the Location data from the Workday endpoint, but it has a different structure for each record in XML. To resolve this issue , we have createda custom script, so that it will take individual records and insert them into a staging table.
To make the individual records, we have created actions in flow designer. Those actions are splitting the records and inserting them into the array.
The splitting works in the background script and even in the flow (checked for one record), but when we put XML that contains 102 records at that time, it is giving the Could not serialize value error.
We found this link, but it is not helpful for us
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0951861
We're stuck on this error. If anyone has expertise in this, please reply to this question.
Thank You!
Thank You!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2025 09:50 PM
Hello @Rushi Savarkar ,
Please use the .toString() method in the subflow where you get the data, and it will resolve your solution.
If my response was helpful, please mark it as correct and helpful.
Thank you
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2025 04:47 PM
I have been dealing with a very similar issue..
A Workday rest call in a custom script in an action in flow designer, the script using restmessagev2 instead of a normal rest step
I realized the problem I had was that due to the size of the XML, I was hitting the string size limit when using ".getBody()" from the response, as this creates a string.
So I created a temporary object like this:
var tempObj = {"responseXML": response.getBody()};
Because objects can hold much larger data, which allowed me to parse the XML and not result in the error you are seeing
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2025 09:50 PM
Hello @Rushi Savarkar ,
Please use the .toString() method in the subflow where you get the data, and it will resolve your solution.
If my response was helpful, please mark it as correct and helpful.
Thank you
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2025 09:52 PM
Hello @Rushi Savarkar ,
If my response was helpful, please mark it as correct and helpful.
Thank you.
Thank you.