Inbound Integration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 01:45 AM
HI
there is a integration between legacy system to servicenow when we create a change from external system change will get create in servicenow whatever the payload they were sending the description field will map to the change description field i want the description to be displayed as line by line current scenerio is \\n is geeting to the description change field i want to remove \\n
please look into the attachement i have added the screenshot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 02:03 AM
Hello @surya majjada,
Are you receiving this from another system?
Thanks and Regards,
Anshul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 02:09 AM
yes Anshul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 02:11 AM
in our script include there is an existing statement grChg.description = payloadString.description;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 02:19 AM - edited 09-19-2023 02:20 AM
Hi @surya majjada
Before setting the value from payload description to change description in your Script, replace \\n to \n so it will be converted to new lines.
var payload_desc = payloadString.description;
grChg.description = paylaod_desc.replaceAll("\\n", "\n"); //Change variable names according to your script.
Anvesh