Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

How to remove the special characters" " that are added to the comment when the user raises a Incident on portal through get help?

Ananya Gupta1
Kilo Explorer

When user creating an incident through get help ,if "double space" is provided at the end of the sentence in the field "Please provide more details so we can quickly solve your problem" .The special characters" " are added to that comment in the backend.

Can anyone tell how to fix this in record producer script-

var details = producer.more_details.getDisplayValue();
details = details.replace(/<\/?[^>]+(>|$)/g, "");
details = details.replace("&nbsp;", " ");
notes += producer.more_details.getQuestion().getLabel() + ':' + '\n' + details + '\n';

 

Thanks in advanced.

5 REPLIES 5

what type of variable is more_details?

var details = producer.more_details.getDisplayValue();

gs.info("My data" + details); // what came here
details = details.replace(/<\/?[^>]+(>|$)/g, "");
details = details.replace("&nbsp;", " ");
notes += producer.more_details.getQuestion().getLabel() + ':' + '\n' + details + '\n';

Regards
Ankur

 

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader