- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2025 10:57 AM - edited 02-02-2025 10:57 AM
Dear Members,
I have designed the Scripted REST API to create an Incident in the ServiceNow.
Issue: - An Incident is created from the REST API Explorer but with the values in the Short Description and Description fields as "org.mozilla.javascript.NativeArray". In the logs the variables are getting the correct values from the Query Parameters but when these variables are passed to the GlideRecord object the 'org.mozilla.javascript.NativeArray' is set.
Please suggest.
Release: - Xanadu
Code: -
Logs: -
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2025 09:09 PM
use toString() while setting the values from line 13 to line 15
gr.short_description = shortDesc.toString()
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2025 09:09 PM
use toString() while setting the values from line 13 to line 15
gr.short_description = shortDesc.toString()
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader