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

Hi Kalyani,

The steps would be:

1. First Create a new Delete List action which is similar to the OOB.(Insert and stay on OOB ui action of Delete)  List action is true. 

2. Update the table as change_task.

 

3. In the condition section you can add the condition:

As this field is storing the value of standard change so you need hide the delete option only for standard changes tasks.

current.std_change_producer_versionISEMPTY

 

Output : The button will not appear in the Realed list Ui when created from standard change.

 

 

Please mark helpful and correct if it works.

Thanks,

CB

Excellent it worked ..Thanks alot

Thanks Happy to help.

It disabled on all type of change requests.I have changed the condition as "current.change_request.type!='standard' it worked.It was greyed out on standard change ctasks realted list and rest it is still enabled.

 

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