Part of Incoming email missing on incident

Pam Walker1
Tera Contributor

We have an email that comes from Salesforce into ServiceNow but one line is missing from the details.

 

When you view the email on the incident the line is there but missing from the incident. If the same incident is forwarded in from someone who has received the email it processes with all details

 

Details on email attached to incident :-

PamWalker1_0-1712761920566.png

Details that show on incident

PamWalker1_1-1712761946491.png

As you can see the Line Manager does not appear on the incident

 

This is the Inbound Action that processes the email

//Create Incident Leaver


//Get User

current.caller_id = gs.getUserID();

current.description = email.origemail + "\n\n" + email.body_text;

 

//Extract Employee Name from email body

var usname = email.body_text;

gs.info(email.body_text);
var usname = email.body_text;
var indexStart = usname.lastIndexOf("Name:");
usname2 = usname.substring(indexStart + 5, usname.indexOf("\n", indexStart)).trim();
gs.info("myUser = " + usname2);


usenddate = usname.substring(usname.lastIndexOf("Employment End Date:") + 21, usname.lastIndexOf("Basis"));
(usenddate.trim());
current.short_description = email.subject + " - " + usname2 + " / " + usenddate;

 

current.location = current.caller_id.location;
current.incident_state = IncidentState.NEW;
current.notify = 2;
current.contact_type = "email";

if (email.body.assign != undefined)
current.assigned_to = email.body.assign;

if (email.importance != undefined) {
if (email.importance.toLowerCase() == "high") {
current.impact = 1;
current.urgency = 1;
}
}

current.insert();

8 REPLIES 8

Add this line to check if its priniting the same result in comments.
 
current.comments = "received from: " + email.origemail + "\n\n" + email.body_text;
 
 

Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Added this line and again the Line Manager is missing from the Comments field

can u try again with just "Manager" instead of "Line Manager".


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Pam Walker1
Tera Contributor

Has anyone else seen anything like this? really puzzled as to what is happening