Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2024 02:50 AM
here is the code
// Note: current.opened_by is already set to the first UserID that matches the From: email address
if (email.to.indexOf("test@test.com") > -1 ||
email.to.indexOf("test@test.com") > -1 ||
email.to.indexOf("test@test..com") > -1 ||
email.to.indexOf("test@test.") > -1 ||
email.origemail.indexOf("test@test.") > -1 ||
email.origemail.indexOf("test@test.") > -1 ||
email.origemail.indexOf("test@test") > -1 ||
email.origemail.indexOf("test@test") > -1 ||
email.origemail.indexOf("test@test") > -1 ||
email.origemail.indexOf("test@test") > -1 ||
email.origemail.indexOf("test@test") > -1
) {
current.caller_id = gs.getUserID();
current.comments = "forwarded by: " + email.origemail + "\n\n" + email.body_text;
current.short_description = email.subject;
var sender_email = email.from;
current.location = getLoc(sender_email);
//current.category = "request";
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.body.priority != undefined)
current.priority = email.body.priority;
if (email.to.indexOf("test@test) > -1 ||
email.to.indexOf("test@test") > -1)
// if (email.to == "test@test")
{
current.category = "Spark CRM";
current.assignment_group = '0116534913cd220031d0bb176144b0c2'; //App_Spark_CRM_Monitor
} else if (email.from.indexOf("test@test") > -1) {
current.category = "Infrastructure";
current.u_lattice_type = "Arctic Wolf";
current.assignment_group = '676b5ac32c3910408c7038b77dce0581';
} else if (email.origemail.indexOf("Tushar.Ghadage@latticesemi.com") > -1 && email.subject.indexOf("Fw: GL Workbench New Extract Refresh Failed") > -1) {
current.impact = 1;
current.urgency = 3;
current.priority = 2;
current.short_description= email.subject;
} else {
current.assignment_group = '676b5ac32c3910408c7038b77dce0581'; //Helpdesk Group
current.category = "ServiceDesk";
}
}
//Fetch user location
function getLoc(user_email) {
var gr = new GlideRecord('sys_user');
gr.addQuery('email', user_email);
gr.query();
if (gr.next()) {
return gr.location; //returns user's location sys_id
}
}
// Rafael Merces - 19/04/2018 - INC0317661 - Add description to forwarded incidents
current.description = "From : " + email.from + "\n Origemail :" + email.origemail + "\n" + email.body_text;
current.u_source = "email";
current.insert();
these is the code for privacy purposes have changed it to test@test.com.
thanks!!!!