- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 02:26 PM
Evening all,
We are trying to send through multi line descripts and work notes through a rest integration but it is not landing with the breaks the other side. Script and screenshot below. Any help as always, most appreciated.
description = current.description.replace(/(\r\n|\n|\r)/gm, \\r\\n);
description = description.replaceAll('\\','\\\\');
description = description.replace(/"/g, '\\"');
We also get the same format when sending multi lines in the work notes fields too.
Jack
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 01:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 02:48 PM
Try this
description = current.description.replace(/(\r\n|\n|\r)/gm,"").replace(/ {1,}/g," ");
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 01:03 AM
Hey
I have tried the above and they get the notes through all in one line with no space!
JAck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 01:37 AM
We also just tried sending as \\n and they get the following