- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2021 07:59 AM
Hi Team,
when the user sends data throught mail,we are updating that respective details to the additional comments,but now user sending data in table format so when the inbound action script is not updating the table format info properly
So anyway to update the exact table format in additional comments which we received from the mail, Please guide me.
Solved! Go to Solution.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2021 10:36 AM
var messageContent = email.body_html;
if (messageContent.indexOf("From") != -1) {
messageContent = messageContent.substring(0, messageContent.indexOf("From")).trim();
} else {
messageContent = messageContent.trim();
}
current.comments = "[CODE]"+ messageContent;
current.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2021 09:18 AM
you are using email.body_text which will convert body into text.
Instead use email.body_html which will retain the html of body
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2021 09:31 AM
okay after changing to email.body_html,we are getting below HTML data
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
<style type="text/css">.style1 {font-family: "Times New Roman";}</style></head><body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<table class="t1" style="border-collapse:collapse">
<tbody>
<tr>
<td class="td1" style="border-style:solid;border-width:1px;border-color:rgb(154, 154, 154);padding:1px 5px">
<p class="p1" style="margin:0px;font:13px "Helvetica Neue"">u_state</p>
</td>
<td class="td1" style="border-style:solid;border-width:1px;border-color:rgb(154, 154, 154);padding:1px 5px">
<p class="p2" style="margin:0px;font:12px Helvetica;min-height:14px"><br>
</p>
</td>
</tr>
<tr>
<td class="td1" style="border-style:solid;border-width:1px;border-color:rgb(154, 154, 154);padding:1px 5px">
<p class="p1" style="margin:0px;font:13px "Helvetica Neue""><span class="Apple-converted-space"> </span>u_number</p>
</td>
<td class="td1" style="border-style:solid;border-width:1px;border-color:rgb(154, 154, 154);padding:1px 5px">
<p class="p1" style="margin:0px;font:13px "Helvetica Neue"">...........co relation id</p>
</td>
</tr>
<tr>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2021 10:03 AM
You can update it additional comments it will retain the table structure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2021 10:10 AM
after updating in comments it still not retained to the table format, as I ping above the same format only came to additional comments
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2021 10:18 AM
try "[code]" + email.body_html