How to Evaluate UI Action Delete

StacyLen
Mega Guru

In the UI Action, "Delete", on the cmdb_ci table, the condition is:

current.isValidRecord() && current.canDelete() && JSUtil.nil(RP.getParameterValue("sysparm_changeset"))

 

(1) I need to know what role is being required by this Condition:

 

Bear in mind that I know very very little in this space.

 

I have user1 who is able to see the Delete Button on cmdb_ci table form.  User2 cannot see the button.

2.  I would like to know how to run the above condition and pass a particular user id to it

3.  I need to know what role is expected/missing for the Delete Button to display for User2

 

See this:

https://YourInstance.servicenowservices.com/now/nav/ui/classic/params/target/sys_ui_action.do%3Fsys_...

 

Any Help appreciated

StacyLen

 

 

2 REPLIES 2

Community Alums
Not applicable

Hi @StacyLen ,

Whenever you encounter these scenarios, ensure you compare the roles given to both the users.

Now, for this UI action, i don't see any exclusive roles being defined to get access to this UI action.

So what you want to check is if the other user who don't see the UI action has access to the cmdb_ci table or not.

You can do that by :

SandeepDutta_0-1724903150987.png

 

Bhavya11
Kilo Patron

Hi @StacyLen ,

 

The  delete ui action has a condition called current.canDelete(); which allows us to control who has access to use the button through ACLs . Please check ACl on cmdb_Ci table operation is Delete.

 

For reference :https://YourInstance.service-now.com/sys_security_acl.do?sys_id=8befe2580a0a0b4400046b909fd1ee76&sys...

 

Compare role given ACL with those two users

 

 

Please mark helpful & correct answer if it's really worthy for you.

 

Thanks,

BK