- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 07:09 AM
Hello,
I have an inbound action rule that is properly finding and updating my incident but two things are missing.
1 the target is empty on the email log.
2. the email doesn't get attached to the incident as email received.
///----------------------------------------------------------
gs.include('validators');
var incNum = email.subject.substring(32,42); //get incident number from email subject
if((email.subject.indexOf("Received") > -1) )
{
var incident_num_rec = new GlideRecord('incident');
incident_num_rec.addQuery();
incident_num_rec.addQuery('number', incNum);
incident_num_rec.query();
if(incident_num_rec.next())
{
incident_num_rec.work_notes = "An email was received from Ricoh Support and forwarded to this ticket";
incident_num_rec.comments = "A Ricoh support call has been opened";
incident_num_rec.u_fournisseur_externe = "Ricoh";
incident_num_rec.state = 3;
incident_num_rec.hold_reason = 4;
incident_num_rec.update();
}
}
else
{
state = stop_processing;
///----------------------------------------------------------
Any help would be appreciated.
Thanks,
MjF
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 08:25 AM
After reviewing a dozen times I realized you wanted my gr. Updated the lines:
sys_email.target_table = "incident";
sys_email.instance = incident_num_rec.sys_id;
sys_email.update();
and it DOES ATTACH MY EMAIL.
Thank you
MjF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 08:25 AM
After reviewing a dozen times I realized you wanted my gr. Updated the lines:
sys_email.target_table = "incident";
sys_email.instance = incident_num_rec.sys_id;
sys_email.update();
and it DOES ATTACH MY EMAIL.
Thank you
MjF

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 08:30 AM
HI,
Thanks mark my answer correct if satisfied.
Thakns,
Ashutosh