ServiceNow to ServiceNow Rest Integration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2023 12:06 AM
Hi,
I am creating the ticket in Instance A and ticket is created in Instance B also, but my question is some times description field is appear like "undefined" when we pass the huge description. Could anyone help me why this error coming only when sending the huge description?
Thanks,
Manju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2023 03:10 AM
Hi @manju5 ,
Payload Size Limitations: Some REST APIs or services impose payload size limitations. If the description is too large, it might exceed these limitations, resulting in unexpected behavior.
Field Size Limitations: Check if there are field size limitations in the receiving system (Instance B) that might be causing the "undefined" behavior when a large description is passed. Some systems have limits on the size of data that can be accepted in a single field.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2023 03:29 AM
I have given the limit is 4000 characters for description field. max_length is 4000 right?
Thanks,
Manju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2023 04:14 AM
Hi @manju5 ,
The problem arose because the third-party system rejected multiline text and anticipated the substitution of all "newline" characters with "\n". My solution was to implement the regular expression.
var short_description = "This is a multiline\nstring with newline characters.";
var replacedText = short_description.replace(/\n/g, "\\n");
If it proves effective for you, consider marking it as helpful.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2023 05:05 AM
It's not working .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2023 05:02 AM
You said sometimes it shows undefined. It means the script is restricting large data in that field.
Can you share what and how the setup is done via screenshots?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader