- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 10:18 AM
Hi All,
I'm using a checklist on my incident form, but I don't want non-admin users to be able to add or remove items(checklist_items).
I tried using the UI macro (inline_checklist_macro) script, but it made all the checkboxes ready-only.
Also can we create report using these checklists.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 10:34 AM
This can be done by adjusting the create ACL present on checklist table.
OOB ACL is present here : https://<instance>.service-now.com/sys_security_acl.do?sys_id=0a3ac670c30202004e44dccdf3d3ae52
replace instance with your instance name.
Remove the role (if any) and in script just write : answer = false; and keep admin overrides to true.
Now this ACL will only allow admins to create new checklist items and keep new items creation from non-admin users.
Do check if there are any other create() ACLs present on checklist table to make sure non-admin should not have access to create.
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 10:25 AM
Hi @MayurGavhane ,
To restrict who can add and remove checklist_items, you can use the following steps:
- Go to System Definition > Tables > checklist_item.
- Click the ACL tab.
- In the Write permission, click Edit.
- In the User Roles section, add the admin role.
- Click Save.
This will restrict all users except for admins from adding or removing checklist_items.
The UI macro (inline_checklist_macro) script will make all the checkboxes ready-only, but it will still allow users to add or remove items. To prevent this, you can use the following code in the script:
if (user_has_role("admin")) { // Allow admin users to add and remove items. } else { // Disable the add and remove buttons for non-admin users. checklist_item_add_button.disable(); checklist_item_remove_button.disable(); }
This code will check the user's role and disable the add and remove buttons for non-admin users.
Yes, you can create reports using checklists. To do this, you can use the following steps:
- Go to Reports > Create Report.
- In the Select a report type section, select Checklist.
- In the Select a checklist section, select the checklist that you want to create a report for.
- Click Next.
- In the Report definition section, configure the report settings.
- Click Create.
The report will be created and you can view it in the Reports list.
Please mark the answer as correct solution and helpful if helped.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 10:34 AM
This can be done by adjusting the create ACL present on checklist table.
OOB ACL is present here : https://<instance>.service-now.com/sys_security_acl.do?sys_id=0a3ac670c30202004e44dccdf3d3ae52
replace instance with your instance name.
Remove the role (if any) and in script just write : answer = false; and keep admin overrides to true.
Now this ACL will only allow admins to create new checklist items and keep new items creation from non-admin users.
Do check if there are any other create() ACLs present on checklist table to make sure non-admin should not have access to create.
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2024 03:28 AM
@sushantmalsure , Hi Sushant, i am trying this ACL, but this ACL is on global table but my table that is having check list is on scoped application, where my requirement is like Need to restrict "Add Item" icon in check list based on roles/groups.
Could you please guide more.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 11:28 AM
Dear @sushantmalsure @nameisnani I changed the ACL above, and it's partially functional now.
However, when I impersonate to an ITIL user, I can still see the "add Item" option, but when I try to save then checklist option vanishes.