Inbound Integration

surya majjada
Tera Contributor

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

6 REPLIES 6

anshul_goyal
Kilo Sage

Hello @surya majjada,
Are you receiving this from another system? 
Thanks and Regards,
Anshul

yes Anshul

in our script include there is an existing statement  grChg.description = payloadString.description; 

AnveshKumar M
Tera Sage
Tera Sage

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.

 

 

 

Thanks,
Anvesh