- 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 08:28 AM
can you share your email body and inbound action ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2021 08:33 AM
below inbound action:
var messageContent = email.body_text;
if (messageContent.indexOf("From") != -1) {
messageContent = messageContent.substring(0, messageContent.indexOf("From")).trim();
} else {
messageContent = messageContent.trim();
}
current.comments = messageContent;
current.update();
Email from the user as below table format is attached below
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2021 08:44 AM
can you try this script and share the log result?
var messageContent = email.body_text;
gs.log("line 1"+messageContent);
if (messageContent.indexOf("From") != -1) {
messageContent = messageContent.substring(0, messageContent.indexOf("From")).trim();
gs.log("line 2"+messageContent);
} else {
messageContent = messageContent.trim();
gs.log("line 3"+messageContent);
}
current.comments = messageContent;
current.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2021 09:11 AM
line 1u_state
u_number
...........co relation id
u_configuration
u_work_notes
u_caller
u_impact
u_short_description
u_opened_by
________________________________
From:abc.com
Sent: 11 January 2021 17:37
To: sbc@com
Subject: Re: EXT || New Incident number INC123 - test
attachment
u_state
u_number
...........co relation id
u_configuration
u_work_notes
u_caller
u_impact
u_short_description
u_subcategory
u_inc_number
……….XOS ticket number
u_additional_comments
u_source
Contact type
u_category
u_urgency
u_assignment_group
u_description
u_opened_by
line 2u_state
u_number
...........co relation id
u_configuration
u_work_notes
u_caller
u_impact
u_short_description
u_opened_by