I want to remove the delete option on the table list view for a scoped application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 06:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 06:53 AM
Hi,
Please follow the steps below to achieve your requirement:
1) This Delete gets visible due to the below UI Action which is written on the Global table
https://instance.service-now.com/nav_to.do?uri=sys_ui_action.do?sys_id=75a1fcce0a0a0b3400d6ed99cf8a87e0
Replace "instance' with your instance name.
2) First you need to override this Delete button so that this requirement of yours should not affect other tables or functionality in ServiceNow
3) Open the above UI Action as per link provided and just change the Table name to your Custom table Name and then Right click on the Header and do Insert and stay as shown below I have done this for Incident:
4) Now once this is done, you can modify the condition of the new UI Action say you want to make this button visible only to admins from List view then modify it as below:
current.canDelete() && gs.hasRole('admin')
Please change your role to the role you want as per your requirement.
Output:
Delete Button is not available and is greyed out for ITIl users from List view:
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 07:05 AM
will it work for scoped application table as well?
because it is throwing errors like 'DeleteRecordAjax' script includes are not in scoped application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 07:09 AM
Hi,
Please follow the approach mentioned in the HI Article created by ServiceNow for achieving this in Scoped Applications:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0692665
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 07:20 AM
when i select delete button, deleting of records is not working after insert and stay of the delete global ui action