Part of Incoming email missing on incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2024 08:16 AM
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 :-
Details that show on incident
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();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2024 09:48 AM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2024 07:13 AM
Added this line and again the Line Manager is missing from the Comments field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 05:53 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2024 05:24 AM
Has anyone else seen anything like this? really puzzled as to what is happening