Email notification

sparkles
Tera Contributor

Hi,

 

I set up an email notification to the assignee if the record got updated by the user. My email notification doesn't work if the user added attachment to an existing ticket via our portal without adding comments. The only time it works if the user added comment. I want the assignee to get notification if the user added attachment to the request. 

 

Thanks,

1 ACCEPTED SOLUTION

Here is the updated script:

 

	var getINC = new GlideRecord('incident');
getINC.addQuery('sys_id',current.table_sys_id);
getINC.query();
	if(getINC.next()){
getINC.comments = 'Attachment has been added!';
getINC.update();
	}
	

 

Change the table name with custom table name you have.

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

View solution in original post

9 REPLIES 9

Can you share the screenshot of BR and use case like steps when this error shows from service portal ?

  

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

I just noticed that new record get inserted to the custom table every time I add attachment. I will send screenshot shortly.

thanks!

Here is the updated script:

 

	var getINC = new GlideRecord('incident');
getINC.addQuery('sys_id',current.table_sys_id);
getINC.query();
	if(getINC.next()){
getINC.comments = 'Attachment has been added!';
getINC.update();
	}
	

 

Change the table name with custom table name you have.

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

Hi Sushant,

 

Thanks for your help, it works with no error, also no new record got inserted to my costume table.

 

Thanks again!!

.