Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
JSON Parse Errors
Hi All,
I've read a few submissions on this, but none of the solutions provided seem to be working.
I'm making my API call, and getting a response, and in my console, I take the response and use JSON.parse(response.getBody()) to return a nice neat object.
Unfortunately when I load this into a scheduled script, I keep getting the "SyntaxError: Unexpected token: " at the JSON.parse line.
I've tried using JSON.parse(JSON.stringify(response.getBody())), and this actually allows the script to run, but the return value isn't an object anymore. Still just a long messy string.
0