Options to remove attached files from incident is not available

PriyanshuVerma1
Tera Expert

In incident form I am not getting option to remove already attached files. See below. I have admin access in instance. I am not sure is this due to any patch update

PriyanshuVerma1_0-1701875741975.png

 

7 REPLIES 7

Danish Bhairag2
Tera Sage
Tera Sage

Hi @PriyanshuVerma1 ,

 

Can u check the delete ACL on attachment table whether admin over ride is ticked or not or is there some specific role provided for deletion.

 

Thanks,

Danish

 

This is the delete acl on sys_attachment table

PriyanshuVerma1_0-1701881642738.png

Below is the script used in acl

      answer = canDeleteAttachment();

function canDeleteAttachment() {
	
	// Remove prefix
	var tableName = current.getValue("table_name");
	if (gs.nil(tableName))
        return false;
	if (tableName.startsWith("invisible."))
		tableName = tableName.substring(10);
	else if (tableName.startsWith("ZZ_YY"))
		tableName = tableName.substring(5);
	
	if (tableName != 'universal_request')
		return false;
	
	var parentRecord = new GlideRecord(tableName);
	if (!parentRecord.isValid())
		return true;
	
	if (!parentRecord.get(current.table_sys_id))
		return true;
	
	return parentRecord.short_description.canWrite();
}

 

 

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @PriyanshuVerma1 

 

As expert said @Danish Bhairag2 , issue with the ACL , so please check the ACL for this, aslo if you delete the attachement from header, but record will be still exits in the activity formatter. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Yeah But the ability to remove attached files from incident should be there as it was there earlier. Currently users are not getting it. I checked the acl it looks fine to me