The CreatorCon Call for Content is officially open! Get started here.

Emails sent in Incident not triggering update of Incident

Deepika Gangra1
Tera Expert

Hi Everyone,

it's possible to have ServiceNow update the "Updated" (sys_updated_on) field when you send an email? Currently, when you send an email from ServiceNow, it does not trigger an update to the date and time on a ticket show that the ticket has been updated.

 

Thanks in advance for help

 

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@Deepika Gangra1 There is no OOTB functionality to support this. However, you can create a business rule on the sys_email table as follows to achieve this desired functionality.

 

Replace the incident table with your table name in the following example.

 

Screenshot 2023-09-26 at 5.56.31 PM.pngScreenshot 2023-09-26 at 5.57.14 PM.png

 

Here is the script for the BR

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	var glideRecord = new GlideRecord('incident');
	if(glideRecord.get(current.instance)){
		glideRecord.setValue('sys_updated_on',new GlideDateTime());
		glideRecord.update();
	}

})(current, previous);

View solution in original post

3 REPLIES 3

Sandeep Rajput
Tera Patron
Tera Patron

@Deepika Gangra1 There is no OOTB functionality to support this. However, you can create a business rule on the sys_email table as follows to achieve this desired functionality.

 

Replace the incident table with your table name in the following example.

 

Screenshot 2023-09-26 at 5.56.31 PM.pngScreenshot 2023-09-26 at 5.57.14 PM.png

 

Here is the script for the BR

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	var glideRecord = new GlideRecord('incident');
	if(glideRecord.get(current.instance)){
		glideRecord.setValue('sys_updated_on',new GlideDateTime());
		glideRecord.update();
	}

})(current, previous);

This works! Thanks

DINMA
Tera Contributor

A question: How to configure automating ticket in SNOW from email?