Inbound Action copy body to description

Brian Lancaster
Tera Sage

I have an inbound action where I need to put the email body into the description field.  How can I get it without all the HTML code but not loose the format?

1 ACCEPTED SOLUTION

Brian Lancaster
Tera Sage

I was able to do it with this code.  We where only getting the <br/> as the html in the body.

var emailBody = email.body_html.toString().replace(/<br\/>/g, "\n");
current.description = emailBody;

View solution in original post

5 REPLIES 5

Brian Lancaster
Tera Sage

I was able to do it with this code.  We where only getting the <br/> as the html in the body.

var emailBody = email.body_html.toString().replace(/<br\/>/g, "\n");
current.description = emailBody;