How to disable delete option from Actions on selected rows on Change request form.

Kalyani28
Tera Contributor

I wanted to remove delete option on standard change where CTASKS are created already.

1 ACCEPTED SOLUTION

Hi Kalyani,

I would recommend using ACL approach so that no new UI action is to be created

1) visit this ACL

URL: https://instanceName.service-now.com/nav_to.do?uri=sys_security_acl.do?sys_id=80dfc5fec0a801664e82539cfb7a0bfb

2) advanced checkbox as true

3) script below

answer = getValue();

function getValue(){

	if(current.change_request.type == 'standard')
		return false;
	else
		return true;

}

find_real_file.png

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

11 REPLIES 11

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Kalyani,

This is driven via Delete UI action conditions. You can override the  global UI  action and then handle the  logic via condition field (i.e make a call to script include to check if CTASKS are already created or not. Depending on the output  you can show or hide the button).

 

- Pradeep Sharma

With standard change creation I have ctasks created already,so I wanted to avoid  deletion of  those ctasks.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Kalyani,

Do you want only for standard change the Delete should be hidden?

When you want to hide the Delete? When there are no change tasks for standard change etc

If you don't want Delete Action to be visible then update OOB table level Delete ACL

In advanced script section use this

answer = false;

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

With standard change creation I have ctasks created already,so I wanted to avoid  deletion of  those ctasks.