The CreatorCon Call for Content is officially open! Get started here.

Need to Remove 'DELETE' UI Action from incident table and it should not affect the parent task table

shashank32
Giga Contributor

Hi

Can anyone suggest me the best way to remove  'DELETE' UI Action from incident table and it should not affect the parent task table.

i duplicated the DELETE ui action with less order and add one more condition in it-- '&&current.getRecordClassName() !='incident';

but its not working .

1 ACCEPTED SOLUTION

Hi,

you are checking with admin?

Did you check any other table level DELETE ACL on incident is allowing?

it worked for me even as an admin when I had 1 table level DELETE ACL on incident table

find_real_file.png

1) list - delete grayed out

find_real_file.png

2) form - delete button not shown

find_real_file.png

Regards
Ankur

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

View solution in original post

11 REPLIES 11

Kartik Sethi
Tera Guru

Hi,

You can create a delete ACL on the Incident table and in the script, you can write:

answer = false; 

This will remove the Delete UI Action for all the users. If you want System Administrators to have the UI Action visible then keep the checkbox true for Admin Overrides.

 

Please mark my answer as correct if this solves your issues.

 

Thanks,

Kartik

Hi Kartik,

what type should i need to give in ACL? 

i tried it by record type , table- incident, script-answer=false;

it didnt worked.

You can have below shown configuration:

find_real_file.png

find_real_file.png 

ACL should be basically incident.none

Anil Lande
Kilo Patron

Hi,

If you don't have table specific Delete UI Action then you need to make changes to Global UI Action.

find_real_file.png

 

This way it will hide delete UI Action on Incident form, for Admin as well.

Also the alternative is to modify Delete ACL's and restrict Delete Access for all users (uncheck admin override and add return false in advanced script)

 

Thanks,
Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande