Notify requestor that attachment is attached in requested item

Samiksha2
Mega Sage

Hi All,

 

I have a requirement to send notification to Requested for and watch list with attachment when attachment is added in the Requested item.

I created a mail script(to add latest attachment in the notification) and added that in the notification when additional comments changes. I asked client to add additional noted when they added attachment. but they are not agreed with this. They didn't agree with this.

Please help in this.

 

Thanks,

Samiksha

13 REPLIES 13

Peter Bodelier
Giga Sage

Hi @Samiksha2,

 

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.

Hi @Peter Bodelier ,

Thank you for replying.

How the the attachment also get attached with the notification?

Th requirement is when a attachment added in the RITM, Requested for and watch list should notify with the attachment.

 

Hi @Samiksha2,

No, it will not attach it. There is a checkbox on the notification record to include attachments with the mail. However, this will add all attachments linked to the requested item.

I would not advise to try to add only the attachment that has been added. Because this would involve creating Business Rules on the sys_email table, which would try to find the right attachment to add, and copy it to the email record.


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

Hi @Peter Bodelier ,

 

Thanks. I will try to convince the client to go with this approach. I hope they will understand.