RITM Notification

Zubair Alam
Tera Contributor

When a user attaches a file to RITM, how can we generate an email notification to the requester and fulfiller that RITM has been updated with a new attachment? 
All help is greatly appreciated. Thanks. 

2 REPLIES 2

Sumanth16
Kilo Patron
Hi,

create a Script Action, which triggers on event attachment.uploaded.

Condition: event.parm1 == 'sc_req_item'

Script:

var ritm= new GlideRecord('sc_req_item');
if (ritm.get(event.parm2)){
	
	if (ritm.active == true){
		ritm.comments= gs.getMessage('An attachment has been added to your request');
		ritm.update();
	}
}

Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

Thanks & Regards,
Sumanth Meda

Robbie
Kilo Patron
Kilo Patron

Hi @Zubair Alam,

 

Take a look at the below link where ccajohnson has explained and demonstrated how this is possible when an attachment is added to an incident.

You want to follow this solution except rather than referencing the incident table and incident record, change it to reference the request item table and request item record.

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.

 

Thanks, Robbie

 

https://www.servicenow.com/community/developer-forum/how-to-trigger-mail-whenever-attachment-is-adde...