update additional comments field with user mail reply

String
Kilo Sage

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.

1 ACCEPTED SOLUTION

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();

View solution in original post

31 REPLIES 31

Hi Pranesh,

I am using the above code to insert  inbound mail action from user to incident and its work like a champ, but after sending that same comments to another user through notification we are getting [code] tag in the mail as below

Hi Alex,

This is in regards to INC00123

[code]

test
Kind Regards,
Admin
 
any suggestions please  on how to remove code tag while sending  to other users 

You can use replace function

gs.print(gr.comments.getJournalEntry(1).replace('[code]',''));