- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2019 09:36 AM
Hi,
Recently we observed that the users with Asset role cannot delete assets but according to Docs they should have that functionality . So not sure what is happening.
Also few weeks back i have modified 3 UI Actions - Delete[Global] , so only admins can have the functionality to delete and all the others will not have that. Do this condition has impact on the delete button on alm_asset table. Please suggest.
Thanks,
Divya
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2019 10:14 AM
That won't work? The users with asset role don't have the admin role I hope? So your condition will evaluate to current.canDelete() = true and gs.hasRole('admin') = false. Because it's &&, your condition is false.
Have you considered changing the ACL's or creating a custom Delete UI Action to overwrite the Global one? In out-of-the-box instances there are some good examples for an overwrite Delete UI Action. Take a look at the one for "kb_knowledge" table for example -> keypoint is the Action Name: "sysverb_delete".
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2019 09:43 AM
Hi there,
The users with this role, is the issue they don't see the Delete UI Action (which you might have changed?). Or is the issue that they can hit the Delete button, but nothing happens/an error occurs.
Have you checked the Delete ACL for table alm_asset. Who is granted to the delete ACL?
Do the users delete the Asset thru the form lay-out or a different way?
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2019 09:55 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2019 09:58 AM
So what actually did you change to the Delete UI Action? The out-of-the-box condition is:
current.canDelete()
This actually, looks at the ACL's. Though if you changed it to something like gs.hasRole('admin') then no others will see the UI Action.
To limit who can delete, rather than changing the UI Action, change your ACL's. Or as alternative, create a custom UI Action for the specific table, with which you wish to override the Global UI Action.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2019 10:11 AM
So i changed it to
current.canDelete()&& gs.hasRole('admin');