How to Evaluate UI Action Delete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 03:30 PM
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:
Any Help appreciated
StacyLen

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 08:46 PM
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 :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 08:52 PM
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